# 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)