from machine import Pin
from time import sleep
print('Wokwi ESP32 Simulator')
led = Pin(2, Pin.OUT) # D2 number in is Output
push_button = Pin(13, Pin.IN) # D13 number pin is input
while True:
while push_button.value() == True:
led.value(1) # led will turn ON
while push_button.value() == False:
led.value(0) # led will turn OFF