# main.py for MicroPython on ESP32 (Wokwi)
import machine
import time
led = machine.Pin(2, machine.Pin.OUT) # ESP32 on-board LED pin (often GPIO2)
while True:
led.value(1)
time.sleep(0.5)
led.value(0)
time.sleep(0.5)
# main.py for MicroPython on ESP32 (Wokwi)
import machine
import time
led = machine.Pin(2, machine.Pin.OUT) # ESP32 on-board LED pin (often GPIO2)
while True:
led.value(1)
time.sleep(0.5)
led.value(0)
time.sleep(0.5)