shinichi satoh
/
mbed_LED_chika
RGB LED chika chika
Fork of mbed_LED_chika by
Diff: main.cpp
- Revision:
- 9:5ba1eff3500b
- Parent:
- 8:c87c95d37988
--- a/main.cpp Wed Jul 15 11:23:20 2015 +0000 +++ b/main.cpp Wed Jul 22 07:54:58 2015 +0000 @@ -1,22 +1,21 @@ +// mbed_LED_chika main.cpp #include "mbed.h" DigitalOut myled1(LED1); -DigitalOut myled2(LED2); -DigitalOut myled3(LED3); -DigitalIn mysw1(PTA4); -DigitalIn mysw2(PTC6); +DigitalIn mysw1(PTA4); // push:0 open:1 int main() { - int i=0; while(1) { - myled1 = mysw1; - myled2 = mysw2; - myled3 = 1; + myled1 = mysw1; // turn off wait(0.9); - myled1 = 0;//(i>>2)&1; - myled2 = 0;//(i>>1)&1; - myled3 = 0;//(i)&1; + myled1 = 0; // turn on wait(0.1); - i++; } } + +// memo +// R-LED -> LED1; +// G-LED -> LED2; +// B-LED -> LED3; +// sw3 -> PTA4 +// sw2 -> PTC6;