Gustavo Vargas Melo / Mbed 2 deprecated BotonFinal

Dependencies:   mbed FXOS8700Q

main.cpp

Committer:
akumagame
Date:
2020-04-15
Revision:
4:87dc862ec3aa
Parent:
3:32058377a827
Child:
5:45bfe4a9d0a0

File content as of revision 4:87dc862ec3aa:

#include "mbed.h"


Serial com1(USBTX, USBRX);

DigitalIn enable(PTA6);
  
 void bot(int b) 
 {
     while(1)
     
     {
     if(enable.read()== 0)
     {
        com1.printf("El boton esta siendo presionado");
    
         }
         
         else
         {
        com1.printf("El boton esta no esta siendo presionado" );
        
             }
      }      
     }
 
 int main()
 {
 
  com1.printf("%i",bot);
  
  }