GROVE - RGB LED サンプルプログラム

Dependencies:   Chainable_RGB_LED mbed

Revision:
0:1a201edebc5c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Nov 30 02:26:50 2013 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+#include "ChainableLED.h"
+
+ChainableLED rgbled(p5,p6,1);  // clk data num
+
+int main() {
+    while(1) {
+        rgbled.setColorRGB(0,255,0,0);  // RED
+        wait(0.5);
+        rgbled.setColorRGB(0,0,255,0);  // GREEN
+        wait(0.5);
+        rgbled.setColorRGB(0,0,0,255);  // BLUE
+        wait(0.5);
+    }
+}