Example program for the Seeed Studio Grove RGB Chainable LED's.
Dependencies: Chainable_RGB_LED mbed
Fork of be_colorful by
Diff: main.cpp
- Revision:
- 0:71564ae5e242
- Child:
- 1:10700868060f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 15 09:42:36 2013 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +#include "ChainableLED.h" + +DigitalOut led(LED4); +// ChainableLED(clk, data, number_of_leds) +ChainableLED color_led(P1_14, P1_13, 1); + +int main() { + uint8_t value = 0; + + while(1) { + value += 10; + // ChainableLED.setColorRGB(index_of_led, red, green, blue) + color_led.setColorRGB(0, value, 0xFF - value, 0); + led = !led; + wait(0.4); + } +} +