Mako SHIMURA
/
mbed_blinky
初めて作ったよ!
main.cpp@0:4e4e32b6abc0, 2014-05-24 (annotated)
- Committer:
- asagin
- Date:
- Sat May 24 05:39:40 2014 +0000
- Revision:
- 0:4e4e32b6abc0
????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
asagin | 0:4e4e32b6abc0 | 1 | #include "mbed.h" |
asagin | 0:4e4e32b6abc0 | 2 | |
asagin | 0:4e4e32b6abc0 | 3 | DigitalOut myled1(LED1); |
asagin | 0:4e4e32b6abc0 | 4 | DigitalOut myled2(LED2); |
asagin | 0:4e4e32b6abc0 | 5 | DigitalOut myled3(LED3); |
asagin | 0:4e4e32b6abc0 | 6 | DigitalOut myled4(LED4); |
asagin | 0:4e4e32b6abc0 | 7 | |
asagin | 0:4e4e32b6abc0 | 8 | |
asagin | 0:4e4e32b6abc0 | 9 | int main() { |
asagin | 0:4e4e32b6abc0 | 10 | while(1) { |
asagin | 0:4e4e32b6abc0 | 11 | myled1 = 1; |
asagin | 0:4e4e32b6abc0 | 12 | myled2 = 0; |
asagin | 0:4e4e32b6abc0 | 13 | myled3 = 0; |
asagin | 0:4e4e32b6abc0 | 14 | myled4 = 0; |
asagin | 0:4e4e32b6abc0 | 15 | wait_ms(50); |
asagin | 0:4e4e32b6abc0 | 16 | myled1 = 0; |
asagin | 0:4e4e32b6abc0 | 17 | myled2 = 1; |
asagin | 0:4e4e32b6abc0 | 18 | wait_ms(50); |
asagin | 0:4e4e32b6abc0 | 19 | myled2 = 0; |
asagin | 0:4e4e32b6abc0 | 20 | myled3 = 1; |
asagin | 0:4e4e32b6abc0 | 21 | wait_ms(50); |
asagin | 0:4e4e32b6abc0 | 22 | myled3 = 0; |
asagin | 0:4e4e32b6abc0 | 23 | myled4 = 1; |
asagin | 0:4e4e32b6abc0 | 24 | wait_ms(50); |
asagin | 0:4e4e32b6abc0 | 25 | } |
asagin | 0:4e4e32b6abc0 | 26 | } |