Gustavo Vargas Melo / Mbed 2 deprecated BotonFinal

Dependencies:   mbed FXOS8700Q

main.cpp

Committer:
akumagame
Date:
2020-04-24
Revision:
7:f313fb383b37
Parent:
6:14523b016fd5

File content as of revision 7:f313fb383b37:

#include "mbed.h"


Serial com1(USBTX, USBRX);

DigitalIn  bot(PTC6);
 
 void boton(int bar)
{
  
     if(bar==0)
     {
        com1.printf("El boton esta siendo presionado\n");
    
         }
         
         else
         {
        com1.printf("El boton esta no esta siendo presionado\n" );
        
             }
            
    
  
 }
 
 int main()
 
  {
    while(1)
    {
    int x;
    x = bot.read();
    boton(x);

  

  }
  }