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