Last active
December 9, 2018 05:14
-
-
Save fearthecowboy/133fa865edd123446f196e8f155f3afc to your computer and use it in GitHub Desktop.
State-machine Arduino example
This file contains 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
// include references to the devices that we'd like to use | |
#include "blinker.h" // an automated blinker | |
#include "switch.h" // a device that supports events for a switch (ie, closed, open) | |
#include "freeMemory.h" // an automated poller that reports teh free memory back to the serial console. | |
// Handy for debugging and seeing how much memory is getting sucked up. | |
// First, declare the states we want in our state machine: | |
States( starting, processing, cleanup ); // these can be anything you'd like. | |
// here are the devices that we're going to use. | |
Switch* switch1; | |
FreeMemoryReport* fm; | |
Blinker* bc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment