Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (8 sloc) 307 Bytes
//runs through the whole rainbow
void rainbow(Light * light, int position, unsigned long tick){
//30 here is the offset between lights.
//you'll probably want to change it depending on
//how far apart the lights are
int hue = (tick + (30 * position)) % 360;
light->color.set_hsb( hue, 100, 100);
}
Something went wrong with that request. Please try again.