void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(2, OUTPUT);
pinMode(4, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int boton = digitalRead(4);
if(boton == 1){
digitalWrite(2, HIGH);
} else {
digitalWrite(2, LOW);
} // this speeds up the simulation
}