Xmas tree serial LED blinking example code

Dependencies:   mbed

Fork of JBB_SerialLED_test by Junichi Katsu

Revision:
0:57df396a2de8
Child:
1:832ea8c566a8
diff -r 000000000000 -r 57df396a2de8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon May 12 11:01:44 2014 +0000
@@ -0,0 +1,32 @@
+/**
+ * Jksoft Blue mbed Board
+ *
+ * Serial LED test program
+ *
+ * Copyright (C) 2014 Junichi Katsu (JKSOFT) 
+ */
+#include "mbed.h"
+#include "LEDStrip.h"
+
+
+int main() {
+	tapeInit(0, 2);	// freq( 0:default ) , SerialLED num
+	
+	while(1)
+	{
+		for( int i=0 ; i < 256 ; i++ )
+		{
+			tapeSet(0,i,0,0);	// LED No , Red , Green , Blue
+			tapeSet(1,0,i,0);	// LED No , Red , Green , Blue
+			tapeSend();			// Send to LED
+			wait_ms(20);
+		}
+		for( int i=255 ; i > 0 ; i-- )
+		{
+			tapeSet(0,i,0,0);	// LED No , Red , Green , Blue
+			tapeSet(1,0,i,0);	// LED No , Red , Green , Blue
+			tapeSend();			// Send to led
+			wait_ms(20);
+		}
+	}
+}
\ No newline at end of file