I'm writing a garage door opener and monitor.
The monitor receives the door status via another Arduino over RF (315 MHz). The code below works, but I feel that I shouldn't need to check the status every time I make a request to the server to open the door. Is there a way to split the code out so that I check the door status every 20 seconds, and the opening and closing of the garage are on demand?
Here is the code: https://github.com/dhysong/ArduinoGarageOpener/blob/master/src/GarageDoorOpener/GarageDoorOpener.ino