//Slide switch
#define led 18
#define slideswitch 4
int value = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(led, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
value = digitalRead(slideswitch);
Serial.print(value);
digitalWrite(led, value);
delay(100); // this speeds up the simulation
}