from machine import Pin
from utime import sleep
import time
led_nr = Pin(4,Pin.OUT)
led_ny = Pin(2,Pin.OUT)
led_ng = Pin(15,Pin.OUT)
led_er=Pin(21,Pin.OUT)
led_ey=Pin(22,Pin.OUT)
led_eg=Pin(23,Pin.OUT)
led_wr=Pin(19,Pin.OUT)
led_wy=Pin(18,Pin.OUT)
led_wg=Pin(5,Pin.OUT)
led_sr=Pin(0,Pin.OUT)
led_sy=Pin(16,Pin.OUT)
led_sg=Pin(17,Pin.OUT)
def turn_on_north():
led_nr.on()
print("ไฟเขียวติด")
def turn_on_east():
led_er.off()
print("ไฟเขียวติด")
def turn_on_south():
led_sr.off()
print("ไฟเขียวติด")
def turn_no_west():
led_wr.off()
print("ไฟเขียวติด")
while True:
turn_on_north()
sleep(5)