#define boton1 7
#define boton2 6
#define boton3 5
#define boton4 4
void setup() {
// put your setup code here, to run once:
pinMode(boton1, INPUT_PULLUP);
pinMode(boton2, INPUT_PULLUP);
pinMode(boton3, INPUT_PULLUP);
pinMode(boton4, INPUT_PULLUP);
Serial.begin(9600);
}
void loop()
{
// put your main code here, to run repeatedly:
if (digitalRead(boton1)== LOW){
Serial.println("boton1 funciona");
}
if (digitalRead(boton2)== LOW){
Serial.println("boton2 funciona");
}
if (digitalRead(boton3)== LOW){
Serial.println("boton3 funciona");
}
if (digitalRead(boton4)== LOW){
Serial.println("boton4 funciona");
}
}