Example using Grove - Chainable RGB LED
Dependencies: Chainable_RGB_LED mbed
Fork of Seeed_Grove_Chainable_RGB_LED_Example by
Revision 0:74eac9e7f286, committed 2014-08-22
- Comitter:
- yihui
- Date:
- Fri Aug 22 08:00:42 2014 +0000
- Commit message:
- inital
Changed in this revision
diff -r 000000000000 -r 74eac9e7f286 Chainable_RGB_LED.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Chainable_RGB_LED.lib Fri Aug 22 08:00:42 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/teams/Seeed/code/Chainable_RGB_LED/#24631ceaa38a
diff -r 000000000000 -r 74eac9e7f286 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Aug 22 08:00:42 2014 +0000 @@ -0,0 +1,16 @@ +#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); + } +} \ No newline at end of file
diff -r 000000000000 -r 74eac9e7f286 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Aug 22 08:00:42 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013 \ No newline at end of file