Digital Output simple example for WIZwiki-W7500 academy
Dependencies: mbed
Fork of DigitalOut_HelloWorld_WIZwiki-W7500 by
main.cpp@0:6cda4e0af931, 2015-07-02 (annotated)
- Committer:
- joon874
- Date:
- Thu Jul 02 01:59:32 2015 +0000
- Revision:
- 0:6cda4e0af931
- Child:
- 1:2c953f7052b3
for WIZwiki-W7500 academy, Digital Output example
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joon874 | 0:6cda4e0af931 | 1 | #include "mbed.h" |
joon874 | 0:6cda4e0af931 | 2 | |
joon874 | 0:6cda4e0af931 | 3 | DigitalOut myled(LED1); // On-board LED_RED |
joon874 | 0:6cda4e0af931 | 4 | |
joon874 | 0:6cda4e0af931 | 5 | int main() { |
joon874 | 0:6cda4e0af931 | 6 | while(1) { |
joon874 | 0:6cda4e0af931 | 7 | myled = 1; // LED On |
joon874 | 0:6cda4e0af931 | 8 | wait(0.2); // 0.2 sec delay |
joon874 | 0:6cda4e0af931 | 9 | myled = 0; // LED Off |
joon874 | 0:6cda4e0af931 | 10 | wait(0.2); // 0.2 sec delay |
joon874 | 0:6cda4e0af931 | 11 | } |
joon874 | 0:6cda4e0af931 | 12 | } |