Push Buttons¶
The push buttons are used to get input from the user.
Sample Code¶
#include <dragonfly_lib.h> /* * Turns the orbs green when button 1 is pressed */ void button1_sample() { orb_init(); // must be called before the orbs are used // the buttons do not need to be initialized before use button1_wait(); // wait until button 1 is pressed // this function will not return until button 1 is pressed // so the next line will not run until button 1 is pressed orb_set_color(GREEN); // turn the orbs green }
Header File¶
For a full list of functions, see the button code header file