# AUTOMATIC STREET LIGHT

from machine import Pin, ADC
from time import sleep
ledObj = Pin(11, Pin.OUT)
adcObj = ADC(26)

while True:
    data = adcObj.read_u16()
    print(data)
    if data <2000:
        ledObj.on()
        sleep(0.5)
    else:
        ledObj.off()
        sleep(0.5)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT