justin kim
/
GPIO_DIGITAL_OUTPUT_W7500ECO
Digital Output Example WIZwiki-W7500ECO version(for protomakers)
main.cpp@0:9006565ef040, 2016-03-24 (annotated)
- Committer:
- justinkim
- Date:
- Thu Mar 24 01:57:13 2016 +0000
- Revision:
- 0:9006565ef040
- Child:
- 1:bf9c8fc50c9c
for protomakers (W7500ECO version Example)
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 | 0:9006565ef040 | 5 | DigitalOut myled_1(PA_1); // USER_LED_1 |
justinkim | 0:9006565ef040 | 6 | DigitalOut myled_2(PA_2); // USER_LED_2 |
justinkim | 0:9006565ef040 | 7 | |
justinkim | 0:9006565ef040 | 8 | int main() |
justinkim | 0:9006565ef040 | 9 | { |
justinkim | 0:9006565ef040 | 10 | while(1) { |
justinkim | 0:9006565ef040 | 11 | myled_1 = 0; // LED_RED ON |
justinkim | 0:9006565ef040 | 12 | myled_2 = 0; // LED_GREEN ON |
justinkim | 0:9006565ef040 | 13 | wait(0.5); |
justinkim | 0:9006565ef040 | 14 | myled_1 = 1; // LED_RED OFF |
justinkim | 0:9006565ef040 | 15 | myled_2 = 1; // LED_GREEN OFF |
justinkim | 0:9006565ef040 | 16 | wait(0.5); |
justinkim | 0:9006565ef040 | 17 | } |
justinkim | 0:9006565ef040 | 18 | } |
justinkim | 0:9006565ef040 | 19 |