from machine import Pin
import time
red = Pin(18, Pin.OUT)
green = Pin(8, Pin.OUT)
yellow = Pin(11, Pin.OUT)
while True:
# Red light
red.on()
print("Red Light On")
time.sleep(0.2)
red.off()
# Green Light
green.on()
print("Yellow Light On")
time.sleep(0.2)bbb
green.off()
#Yellow light
red.off()
yellow.on()
print("Green Light On")
time.sleep(0.2)
yellow.off()