red-blue buttons

Dependencies:   mbed

main.cpp

Committer:
RiP
Date:
2016-09-12
Revision:
1:f5e63bb24359
Parent:
0:f0c7a0214862

File content as of revision 1:f5e63bb24359:

#include "mbed.h"

DigitalIn enable(PTA4);
DigitalIn enables(PTC6);

DigitalOut red(LED_RED);
DigitalOut green(LED_GREEN);
DigitalOut blue(LED_BLUE);

int main()
{  
   while(true){
    red=1;blue=1;green=1;
    if(enable==0)
    {
        red=0;
    }
    else if(enables==0)
    {
        green=0;    
    }

    }
}