print("Hello, Pi Pico!")
print("This is Experiment - 7 and Objective - 3")
print('''Name:Ashwini Kumar Behera ; Registration No.: 1941012390")
print("Objective : 3 Implementation of ADC on Micro-python with Raspberry Pi
- Turn the Knob: Control an LED using POT.''')
import machine
import utime
potentiometer=machine.ADC(28)
led=machine.PWM(machine.Pin(15))
led.freq(1000)
while True:
reading=potentiometer.read_u16()
print(reading)
led.duty_u16(reading)
utime.sleep_ms(200)