libreria para boton

Committer:
gilbertogn
Date:
Wed Feb 17 14:10:09 2016 +0000
Revision:
0:aa1593c7fe2b
gilberto

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gilbertogn 0:aa1593c7fe2b 1 #ifndef GILBERTO
gilbertogn 0:aa1593c7fe2b 2 #define GILBERTO
gilbertogn 0:aa1593c7fe2b 3 #include "mbed.h"
gilbertogn 0:aa1593c7fe2b 4
gilbertogn 0:aa1593c7fe2b 5 DigitalIn Botondeentrada(D2);
gilbertogn 0:aa1593c7fe2b 6 DigitalOut Led(LED2);
gilbertogn 0:aa1593c7fe2b 7 void gilberto_mensaje(){
gilbertogn 0:aa1593c7fe2b 8 }
gilbertogn 0:aa1593c7fe2b 9 int main() {
gilbertogn 0:aa1593c7fe2b 10 while(1){
gilbertogn 0:aa1593c7fe2b 11 if(Botondeentrada==1){
gilbertogn 0:aa1593c7fe2b 12 Led=0;
gilbertogn 0:aa1593c7fe2b 13 }else{
gilbertogn 0:aa1593c7fe2b 14 Led=1;
gilbertogn 0:aa1593c7fe2b 15 }
gilbertogn 0:aa1593c7fe2b 16 }
gilbertogn 0:aa1593c7fe2b 17 }
gilbertogn 0:aa1593c7fe2b 18
gilbertogn 0:aa1593c7fe2b 19
gilbertogn 0:aa1593c7fe2b 20 #endif