Junichi Katsu
/
mbed_blinky__3
テスト用
Fork of mbed_blinky__2 by
main.cpp@2:9cef3569a596, 2016-12-24 (annotated)
- Committer:
- jksoft
- Date:
- Sat Dec 24 06:17:31 2016 +0000
- Revision:
- 2:9cef3569a596
- Parent:
- 1:f979189cb4ec
???;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:5e6fd9fcf7b2 | 1 | #include "mbed.h" |
jksoft | 0:5e6fd9fcf7b2 | 2 | |
jksoft | 1:f979189cb4ec | 3 | DigitalOut myled1(LED1); |
jksoft | 1:f979189cb4ec | 4 | DigitalOut myled2(LED2); |
jksoft | 1:f979189cb4ec | 5 | DigitalOut myled3(LED3); |
jksoft | 1:f979189cb4ec | 6 | |
jksoft | 1:f979189cb4ec | 7 | DigitalOut myled[4] = {LED1,LED2,LED3,LED4}; |
jksoft | 0:5e6fd9fcf7b2 | 8 | |
jksoft | 0:5e6fd9fcf7b2 | 9 | int main() { |
jksoft | 0:5e6fd9fcf7b2 | 10 | while(1) { |
jksoft | 1:f979189cb4ec | 11 | for(int i=0;i<4;i++) |
jksoft | 1:f979189cb4ec | 12 | { |
jksoft | 1:f979189cb4ec | 13 | myled[i] = 1; |
jksoft | 1:f979189cb4ec | 14 | wait(0.2); |
jksoft | 1:f979189cb4ec | 15 | } |
jksoft | 1:f979189cb4ec | 16 | for(int i=0;i<4;i++) |
jksoft | 1:f979189cb4ec | 17 | { |
jksoft | 1:f979189cb4ec | 18 | myled[i] = 0; |
jksoft | 1:f979189cb4ec | 19 | wait(0.2); |
jksoft | 1:f979189cb4ec | 20 | } |
jksoft | 0:5e6fd9fcf7b2 | 21 | } |
jksoft | 0:5e6fd9fcf7b2 | 22 | } |