Skip to content

Instantly share code, notes, and snippets.

@eggie5
Created April 26, 2014 07:03
Show Gist options
  • Select an option

  • Save eggie5/11313714 to your computer and use it in GitHub Desktop.

Select an option

Save eggie5/11313714 to your computer and use it in GitHub Desktop.
sharknado state machine loop
void loop() {
//next state logic
state=next_state;
if (state==START) start_routine();
else if(state==SEARCH) search_routine();
else if(state==BEACON) beacon_search_routine();
else if(state==ESCAPE) escape_routine();
else if(state==DONE_WAIT) done_wait();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment