counter ver1

Dependencies:   mbed

main.cpp

Committer:
rtandil
Date:
2017-03-06
Revision:
1:cbdba17a7bd5
Parent:
0:99aabdc13d25

File content as of revision 1:cbdba17a7bd5:

#include "mbed.h"

DigitalIn count(USER_BUTTON);
DigitalOut myled(LED1);
int main() 
{
    while(1) 
    {
        
        if (count == 1)
        {
             wait_ms(100);
             if (count == 0)
             {
                myled = 1;
             }
             else
             {
                 myled = 0;
            }   
        }
    }
}