/* * Example of using the ChainableRGB library for controlling a Grove RGB. * This code cycles through all the colors in an uniform way. This is accomplished using a HSB color space. */ #include #define NUM_LEDS 5 ChainableLED leds(7, 8, NUM_LEDS); void setup() { leds.init(); } float hue = 0.0; boolean up = true; void loop() { for (byte i=0; i=1.0 && up) up = false; else if (hue<=0.0 && !up) up = true; }