kwon soonho
/
test1
LED BLINK
Diff: main.cpp
- Revision:
- 0:886291b9ef01
diff -r 000000000000 -r 886291b9ef01 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 11 02:32:46 2017 +0000 @@ -0,0 +1,33 @@ +#include "mbed.h" + +//PC_8 red +//PC_9 green +//PC_5 blue + +//port init +DigitalOut RED(PC_8); +DigitalOut GREEN(PC_9); +DigitalOut BLUE(PC_5); + +int main(void) +{ + RED = 0; + GREEN = 0; + BLUE = 0; + + while(1) + { + // RED = 1; + // wait(1); //sec + // GREEN = 1; + // wait(1); //sec + BLUE = 1; + // wait(3); //sec + // RED = 0; + // wait(1); //sec + // GREEN = 0; + wait(1); //sec + BLUE = 0; + wait(1); //sec + } +} \ No newline at end of file