const int LED = 7;
const int boton1 = 2;
void setup() {
pinMode(LED, OUTPUT);
pinMode(boton1, INPUT);
}
void loop() {
if(digitalRead(boton1)==HIGH){
digitalWrite(LED, HIGH);
}
else{
digitalWrite(LED, LOW);
}
}
const int LED = 7;
const int boton1 = 2;
void setup() {
pinMode(LED, OUTPUT);
pinMode(boton1, INPUT);
}
void loop() {
if(digitalRead(boton1)==HIGH){
digitalWrite(LED, HIGH);
}
else{
digitalWrite(LED, LOW);
}
}