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:25:15 2015 +0000
Revision:
5:e55bdf0dc916
Parent:
4:51a161fb600c
Child:
6:237a4d28a84f
comment changed

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