Akira Kashihara
/
Sample2
Many LEDs.
Diff: main.cpp
- Revision:
- 0:1cb4565d9dfe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 11 15:43:55 2012 +0000 @@ -0,0 +1,37 @@ +#include "mbed.h" + +DigitalOut myled1(p5); +DigitalOut myled2(p6); +DigitalOut myled3(p7); +DigitalOut myled4(p8); +DigitalOut myled5(p9); +DigitalOut myled6(p10); + +int main() { + while(1) { + myled1 = 1; + wait(0.2); + myled2 = 1; + wait(0.2); + myled3 = 1; + wait(0.2); + myled4 = 1; + wait(0.2); + myled5 = 1; + wait(0.2); + myled6 = 1; + wait(0.2); + myled6 = 0; + wait(0.2); + myled5 = 0; + wait(0.2); + myled4 = 0; + wait(0.2); + myled3 = 0; + wait(0.2); + myled2 = 0; + wait(0.2); + myled1 = 0; + wait(0.2); + } +} \ No newline at end of file