Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of JBB_SerialLED_test by
Diff: main.cpp
- Revision:
- 0:57df396a2de8
- Child:
- 1:832ea8c566a8
--- /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
