justin kim
/
GPIO_DIGITAL_OUTPUT_W7500ECO
Digital Output Example WIZwiki-W7500ECO version(for protomakers)
main.cpp@1:bf9c8fc50c9c, 2016-03-24 (annotated)
- Committer:
- justinkim
- Date:
- Thu Mar 24 02:00:33 2016 +0000
- Revision:
- 1:bf9c8fc50c9c
- Parent:
- 0:9006565ef040
????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
justinkim | 0:9006565ef040 | 1 | /* Digital Output Example Program */ |
justinkim | 0:9006565ef040 | 2 | |
justinkim | 0:9006565ef040 | 3 | #include "mbed.h" |
justinkim | 0:9006565ef040 | 4 | |
justinkim | 1:bf9c8fc50c9c | 5 | DigitalOut myled_1(PA_1); // USER_LED_1 ENABLE |
justinkim | 1:bf9c8fc50c9c | 6 | DigitalOut myled_2(PA_2); // USER_LED_2 ENABLE |
justinkim | 1:bf9c8fc50c9c | 7 | |
justinkim | 0:9006565ef040 | 8 | int main() |
justinkim | 0:9006565ef040 | 9 | { |
justinkim | 0:9006565ef040 | 10 | while(1) { |
justinkim | 1:bf9c8fc50c9c | 11 | myled_1 = 0; // USER_LED_1 ON |
justinkim | 1:bf9c8fc50c9c | 12 | myled_2 = 0; // USER_LED_2 ON |
justinkim | 0:9006565ef040 | 13 | wait(0.5); |
justinkim | 1:bf9c8fc50c9c | 14 | myled_1 = 1; // USER_LED_1 OFF |
justinkim | 1:bf9c8fc50c9c | 15 | myled_2 = 1; // USER_LED_2 OFF |
justinkim | 0:9006565ef040 | 16 | wait(0.5); |
justinkim | 0:9006565ef040 | 17 | } |
justinkim | 0:9006565ef040 | 18 | } |
justinkim | 0:9006565ef040 | 19 |