#Write a micropython code – Automatic Street Light control based on Light intensity (use components- Raspberry Pi PICO ,LDR, LED)
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)