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