k

Dependencies:   mbed

main.cpp

Committer:
gerardo_carmona
Date:
2014-10-07
Revision:
0:3fb63a3c606b

File content as of revision 0:3fb63a3c606b:

#include "mbed.h"

DigitalOut myled(LED1);
DigitalIn boton(D2);

int main() {
    boton.mode(PullUp);
    while(1) {
        if (boton == 1){
            myled = 1;
        } else {
            myled = 0;
        }
    }
}