from machine import Pin
from time import sleep
# Pin configuration (adjust to Wokwi layout)
button = Pin(15, Pin.IN, Pin.PULL_DOWN) # Button on GPIO15
led_green = Pin(14, Pin.OUT) # Green LED on GPIO14
led_red = Pin(13, Pin.OUT) # Red LED on GPIO13
while True:
if button.value() == 1:
led_green.on()
led_red.off()
else:
led_green.off()
led_red.on()
sleep(0.1)