Digital Output simple example for WIZwiki-W7500 academy

Dependencies:   mbed

Fork of DigitalOut_HelloWorld_WIZwiki-W7500 by Lawrence Lee

Committer:
IOP
Date:
Fri Jul 24 00:04:23 2015 +0000
Revision:
4:51a161fb600c
Parent:
3:feaf2432da5b
Child:
5:e55bdf0dc916
edited comments

Who changed what in which revision?

UserRevisionLine numberNew 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
joon874 3:feaf2432da5b 5 DigitalOut myled1(LED1); // On-board LED_RED
IOP 4:51a161fb600c 6 DigitalOut myled2(LED2); // On-board LED_BLUE
IOP 4:51a161fb600c 7 DigitalOut myled3(LED3); // On-board LED_GREEN
joon874 3:feaf2432da5b 8 int main()
joon874 3:feaf2432da5b 9 {
joon874 0:6cda4e0af931 10 while(1) {
IOP 4:51a161fb600c 11 myled1 = 1; // Red OFF
IOP 4:51a161fb600c 12 myled2 = 0; // Blue ON
IOP 4:51a161fb600c 13 myled3 = 0; // Green ON
IOP 4:51a161fb600c 14 wait(0.2); // 0.2 sec delay
IOP 4:51a161fb600c 15 myled1 = 0; // Red ON
IOP 4:51a161fb600c 16 myled2 = 1; // Blue OFF
IOP 4:51a161fb600c 17 myled3 = 0; // Green ON
joon874 3:feaf2432da5b 18 wait(0.2);
IOP 4:51a161fb600c 19 myled1 = 0; // Red ON
IOP 4:51a161fb600c 20 myled2 = 0; // Blue ON
IOP 4:51a161fb600c 21 myled3 = 1; // Green OFF
joon874 1:2c953f7052b3 22 wait(0.2);
joon874 0:6cda4e0af931 23 }
joon874 0:6cda4e0af931 24 }