Junichi Katsu
/
mbed_blinky__2
テスト用
main.cpp@1:f979189cb4ec, 2016-12-24 (annotated)
- Committer:
- jksoft
- Date:
- Sat Dec 24 06:13:24 2016 +0000
- Revision:
- 1:f979189cb4ec
- Parent:
- 0:5e6fd9fcf7b2
LED4???????????
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 | DigitalOut myled4(LED4); |
jksoft | 1:f979189cb4ec | 7 | |
jksoft | 1:f979189cb4ec | 8 | DigitalOut myled[4] = {LED1,LED2,LED3,LED4}; |
jksoft | 0:5e6fd9fcf7b2 | 9 | |
jksoft | 0:5e6fd9fcf7b2 | 10 | int main() { |
jksoft | 0:5e6fd9fcf7b2 | 11 | while(1) { |
jksoft | 1:f979189cb4ec | 12 | for(int i=0;i<4;i++) |
jksoft | 1:f979189cb4ec | 13 | { |
jksoft | 1:f979189cb4ec | 14 | myled[i] = 1; |
jksoft | 1:f979189cb4ec | 15 | wait(0.2); |
jksoft | 1:f979189cb4ec | 16 | } |
jksoft | 1:f979189cb4ec | 17 | for(int i=0;i<4;i++) |
jksoft | 1:f979189cb4ec | 18 | { |
jksoft | 1:f979189cb4ec | 19 | myled[i] = 0; |
jksoft | 1:f979189cb4ec | 20 | wait(0.2); |
jksoft | 1:f979189cb4ec | 21 | } |
jksoft | 0:5e6fd9fcf7b2 | 22 | } |
jksoft | 0:5e6fd9fcf7b2 | 23 | } |