//Forward declare any custom functions void my_function(void); void setup() { set_timeout(5000, my_function); } void loop() { think(); act(); } void think() { block_value = weighted_average(neighbor_data); } void act() { if(block_value > 200) { clear_timeout();//Cancel the call the my_function(); } set_drive(255); } //This function will be called after 5 seconds of powering on unless clear_timeout() is called prior void my_function(void) { toggle_directions(); }