![](/media/cache/profiles/9bd5ee6fe55aaeb673025dbcb8f939c1.50x50_q85.jpg)
Xmas tree serial LED blinking example code
Fork of JBB_SerialLED_test by
main.cpp
- Committer:
- jksoft
- Date:
- 2014-05-12
- Revision:
- 0:57df396a2de8
- Child:
- 1:832ea8c566a8
File content as of revision 0:57df396a2de8:
/** * 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); } } }