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:
6:237a4d28a84f
Parent:
5:e55bdf0dc916
Child:
7:d4c147471a03

File content as of revision 6:237a4d28a84f:

/* Digital Output Example Program */

#include "mbed.h"

DigitalOut myled_R(D9);     // LED_RED on easy module shield
DigitalOut myled_G(D10);    // LED_GREEN on easy module shield
DigitalOut myled_B(D11);    // LED_BLUE on easy module shield
int main()
{    
    while(1) {
        myled_R = 1;       // Red ON
        myled_G = 1;       // Green LED ON
        myled_B = 0;       // Blue LED OFF
        wait(0.5);        // 0.5 sec delay
        myled_R = 0;       // Red OFF
        myled_G = 1;       // Green LED ON  
        myled_B = 1;       // Blue LED ON
        wait(0.5);        // 0.5 sec delay
        myled_R = 1;       // Red LED ON
        myled_G = 0;       // Green LED OFF  
        myled_B = 1;       // Blue LED ON  
        wait(0.5);        // 0.5 sec delay
    }
}