Created
March 26, 2016 02:12
-
-
Save mcgodfrey/9f7d871b1ce7590b98a6 to your computer and use it in GitHub Desktop.
Code snippet for timers in homebrew temperature logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void loop() { | |
//poll the timers | |
//if any of these have expired then their callback will automatically run. | |
conversionTimer.run(); | |
measTimer.run(); | |
display_timeout.run(); | |
//... | |
//reset the display timeout timer if a button was pressed | |
if(button_up.pushed() || button_down.pushed() || button_select.pushed()){ | |
display_timeout.restart(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment