from machine import Pin, ADC
from utime import sleep
LDR_Pin = ADC(Pin(15, Pin.IN))
LED_Pin = Pin(2, Pin.OUT)

while True:
   LDR = LDR_Pin.read()
   print('LDR:',LDR)
   if LDR >=3000:
     LED_Pin.off()
   else:
     LED_Pin.on()
   sleep(0.5)