void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(33, INPUT_PULLUP);
pinMode(27 , OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
boolean readButton = !digitalRead(33);
Serial.print(readButton);
if(readButton==1){
digitalWrite(27,HIGH);
}
else{
digitalWrite(27,LOW);
}
}LED 27 PIN OUTPUT
BUTTON 33 PIN INPUT