Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- DoTTi
- Date:
- 2016-01-21
- Revision:
- 0:369891f9a34f
File content as of revision 0:369891f9a34f:
#include "mbed.h"
 
DigitalOut myled(LED1);
DigitalIn taster(P0_10);
int main()
{
int counter=-1;
int tasteralt=1;
int tasterneu;
    //taster.mode(PullUp);
    wait(.001);
    while(1) {
        tasterneu = taster;
        if ((tasterneu==0) && (tasteralt==1))
        {
            counter++;
        }
        if(counter ==10)
        {
            myled=1;
            wait(1);
            counter=0;
        }
        else{
            myled=0;
        }
        tasteralt = tasterneu;
    }
}