Have two arduino mega linked with HC12 when a button is pushed on the first it sends a number 1-4 to the second unit. From that I want to call a function to run. Looks right and i get no errors but it does not run the function and it is receiving the info.. Never used parseInt before but from what I see online I am using it right?
void loop() {
while (Serial1.available()==0) {
}
{
LedStat = Serial1.parseInt();
if (LedStat==1) longPressStart1;
if (LedStat==2) longPressStart2;
}