print("Hello, Pi Pico!")
print("This is Experiment - 7 and Objective - 7")
print("Name: Ashwini Kumar Behera; Registration No.: 1941012390")
print('''Objective : 7 Implementation of a LDR Testing to
calculate the Percentage of Light using LDR module and Raspberry
Pi.''')
from machine import ADC,Pin
from time import sleep
photoPIN=28
def readLight(photoGP):
photoRes=ADC(Pin(28))
light=photoRes.read_u16()
light=round(light/65535*100,2)
return light
while True:
print("Light: "+str(readLight(photoPIN))+"%")
sleep