import time
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico!")
from machine import ADC,Pin
import math
GAMMA = 0.7;
RL10 = 50;
ldr=ADC(Pin(26))
while 1:
voltage=(ldr.read_u16()/65535.0)*3.300
resistance = 2000 * voltage / (1 - voltage / 3.30)
lux = pow(RL10 * 1e3 * pow(10, GAMMA) / resistance, (1 / GAMMA))
print(lux)
time.sleep(0.3)