Orbs¶
The orbs are the colored lights on the front of the robot.
Sample Code¶
#include <dragonfly_lib.h> /* * Turns orb 1 to blue and orb 2 to purple. */ void turn_on_orbs() { orb_init(); // must be called before using any orb code orb1_set_color(BLUE); // set orb 1 to blue orb2_set_color(PURPLE); // set orb 2 to purple }
#include <dragonfly_lib.h> /* * Turns orb 1 to a different shade of blue and orb 2 to a different shade of purple */ void turn_on_orbs2() { orb_init(); // must be called before using any orb code orb1_set(0, 0, 124); // set orb 1 to blue (red=0, green=0, blue=124) orb2_set(124, 0, 255); // set orb 2 to purple (red=124, green=0, blue=255) }
Header File¶
For a full list of functions and colors, see the orb code header file