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