JeromeAriola:
void loop(){
if(radio.available()){
//instructions
commsDelay = 10;
}
commsDelay += 10;
delay(10);
verifySuccessfulComms();
}
I am going to use your suggestion, but I wish to "debug" this one.
Before asking that question you should have tried your program to see what happens. The Arduino system is designed to make that very easy. Debugging is the art of trying things out and trying to make sense of the results as an indication of what is wrong. Get into the habit of testing your code very frequently.
In general, your code should function very like the code I suggested as the timer gets reset when a message is received but the timer value accumulates when a message is not received. Note how the words in bold describe the behaviour without using any code. That sort of description is usually the best starting point for figuring out a solution.
The downside, however, is that by using delay() it is not checking the "incoming mail" very often and also time is being wasted that might be used to do something else useful.
Thinking and planning is essential for successful debugging. You need to have an expectation of how some code will work and have an expectation of what will demonstrate that it is not working. For example you might include code to print a variable so you can see if it is behaving as you expect it to.
...R