int buttonState = 0; void setup(){ Serial.begin(115200); Serial.print("FABLAB HONG KONG CMASS iSPACE | TEST CODE FOR ESP32 BLINK"); pinMode(23, INPUT); pinMode(22, OUTPUT); } void loop() { // read the state of the pushbutton value: buttonState = digitalRead(23); if (buttonState == HIGH) { digitalWrite(22, HIGH); // turn the LED on (HIGH is the voltage level) delay(500); // wait for a second digitalWrite(22, LOW); // turn the LED off by making the voltage LOW delay(500); // wait for a second } else { // turn LED ON: digitalWrite(22, HIGH); } }