Seeed


A hardware innovation platform for makers to grow inspirations into differentiating products.

Grove Chainable RGB LED

Grove - Chainable RGB LED is full color LED. It can be cascaded. This program shows color changes over time.

Hardware

  • Arch Board
  • Grove - Chainable RGB LED

http://xiongyihui.github.io/archcookbook/figures/temperature_color.png

Software

Import the following code to mbed online compiler

#include "mbed.h"
#include "ChainableLED.h"
 
// ChainableLED(clk, data, number_of_leds)
ChainableLED color_led(P1_14, P1_13, 1);
 
int main() {
    uint8_t value = 0;
    
    while(1) {
        value++;
        // ChainableLED.setColorRGB(index_of_led, red, green, blue)
        color_led.setColorRGB(0, value, 255 - value, value + 80);
        wait_ms(10);
    }
}


All wikipages