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.
Diff: main.cpp
- Revision:
- 0:2a6f2b9e790d
- Child:
- 1:1286125a89ba
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Oct 12 20:34:07 2013 +0000 @@ -0,0 +1,38 @@ +#include "mbed.h" + +DigitalOut red(LED1); +DigitalOut blue(LED2); +DigitalOut green(LED3); +DigitalOut yellow(LED4); +int main() { + int count[16][4] = {{0,0,0,1},{0,0,1,0},{0,0,1,1},{0,1,0,0}, + {0,1,0,1},{0,1,1,0},{0,1,1,1},{1,0,0,0}, + {1,0,0,1},{1,0,1,0},{1,0,1,1},{1,1,0,0}, + {1,1,0,1},{1,1,1,0},{1,1,1,1},{0,0,0,0}}; + while(1) { + int i; + int j; + for ( i = 0 ; i < 16 ; i++ ) + { + for ( j = 0 ; j < 4 ; ) + { + red = count[i][j]; + printf("%c\n",count[i][j]); + blue = count[i][j+1]; + printf("%c",count[i][j+1]); + green = count[i][j+2]; + printf("%c",count[i][j+2]); + yellow = count[i][j+3]; + printf("%c",count[i][j+3]); + wait(3.0); + } + + } + //red = blue = green = yellow = 0; + //wait(1.0); + //red = 1; + //blue = green = yellow = 0; + //myled = 0; + //wait(0.2); + } +}