from machine import Pin
from time import sleep

r = Pin(15, Pin.OUT)
y = Pin(2, Pin.OUT)
g = Pin(4, Pin.OUT)

while True:
  g.on() 
  sleep(5)
  g.off()
  y.on()
  sleep(2)
  y.off()
  r.on()
  sleep(3)
  r.off()