Digital Output simple example for WIZwiki-W7500 academy
Dependencies: mbed
Fork of DigitalOut_HelloWorld_WIZwiki-W7500 by
main.cpp@11:a009ae657cab, 2016-01-06 (annotated)
- Committer:
- IOP
- Date:
- Wed Jan 06 06:34:52 2016 +0000
- Revision:
- 11:a009ae657cab
- Parent:
- 10:31436dd26b70
- Child:
- 12:3f5f5d8811e3
change pin name
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joon874 | 2:a40176947d21 | 1 | /* Digital Output Example Program */ |
joon874 | 2:a40176947d21 | 2 | |
joon874 | 3:feaf2432da5b | 3 | #include "mbed.h" |
joon874 | 0:6cda4e0af931 | 4 | |
IOP | 11:a009ae657cab | 5 | DigitalOut myled(LED_RED); // LED1 is red led on WIZwiki-W7500 |
IOP | 10:31436dd26b70 | 6 | |
joon874 | 3:feaf2432da5b | 7 | int main() |
IOP | 6:237a4d28a84f | 8 | { |
joon874 | 0:6cda4e0af931 | 9 | while(1) { |
IOP | 10:31436dd26b70 | 10 | myled = 0; // Red LED ON |
IOP | 6:237a4d28a84f | 11 | wait(0.5); // 0.5 sec delay |
IOP | 10:31436dd26b70 | 12 | myled = 1; // Red LED OFF |
IOP | 6:237a4d28a84f | 13 | wait(0.5); // 0.5 sec delay |
joon874 | 0:6cda4e0af931 | 14 | } |
joon874 | 0:6cda4e0af931 | 15 | } |