import time
from machine import Pin

time.sleep(0.1) # Wait for USB to become ready

# Defining the connections to the board
buttonPin = 18
redPin = 0
yellowPin = 5
greenPin = 9

# Defining our devices (LEDs are OUT and Buttons are IN)
button = Pin(buttonPin, machine.Pin.IN, machine.Pin.PULL_UP)
red_led = Pin(redPin, machine.Pin.OUT)
yellow_led = Pin(yellowPin, machine.Pin.OUT)
green_led = Pin(greenPin, machine.Pin.OUT)


# Add code here to run the traffic light if the button is pressed (value = 0)
while True:
    # If the button is pressed, run this code
    if(button.value() == 0):
        # Enter your code to run the traffic light here
        red_led.on()
        time.sleep(1)
        red_led.off()
        # Continue the code here

    # If the button isn't pressed, run this code
    else:
        # Enter your code to turn off all the LEDs here
        red_led.off()
        # Continue the code here
$abcdeabcde151015202530fghijfghij
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT