Digital Output simple example for WIZwiki-W7500 academy

Dependencies:   mbed

Fork of DigitalOut_HelloWorld_WIZwiki-W7500 by Lawrence Lee

main.cpp

Committer:
IOP
Date:
2015-07-24
Revision:
4:51a161fb600c
Parent:
3:feaf2432da5b
Child:
5:e55bdf0dc916

File content as of revision 4:51a161fb600c:

/* Digital Output Example Program */

#include "mbed.h"

DigitalOut myled1(LED1);    // On-board LED_RED
DigitalOut myled2(LED2);    // On-board LED_BLUE
DigitalOut myled3(LED3);    // On-board LED_GREEN
int main()
{
    while(1) {
        myled1 = 1;       // Red OFF
        myled2 = 0;       // Blue ON
        myled3 = 0;       // Green ON
        wait(0.2);        // 0.2 sec delay
        myled1 = 0;       // Red ON
        myled2 = 1;       // Blue OFF  
        myled3 = 0;       // Green ON
        wait(0.2);
        myled1 = 0;       // Red ON
        myled2 = 0;       // Blue ON  
        myled3 = 1;       // Green OFF  
        wait(0.2);
    }
}