const int led= 0;
const int boton= 9;
int botonAnt= LOW;
int botonAct= LOW;
const int led2= 4;
const int boton2= 4;
int botonAnt2= LOW;
int botonAct2= LOW;
void setup() {
pinMode(led, OUTPUT);
pinMode(boton, INPUT_PULLUP);
pinMode(led2, OUTPUT);
pinMode(boton2, INPUT_PULLUP);
}
void loop(){
botonAct = digitalRead(boton);
if (botonAnt == HIGH && botonAct == LOW);
{ digitalWrite(led, !digitalRead(led));}
botonAnt = botonAct;
botonAct2 = digitalRead(boton2);
if (botonAnt2 == HIGH && botonAct2 == LOW);
{ digitalWrite(led2, !digitalRead(led2));}
botonAnt2 = botonAct2;
}