print("Hello, ESP32!")
from machine import Pin
from machine import PWM,ADC
import time
pot_pin = ADC(Pin(34))
LED1 = Pin(14,Pin.OUT)
LED2 = Pin(33,Pin.OUT)
pwm1 = PWM(LED1)
pwm2 = PWM(LED2)
while True:
pot_value = pot_pin.read()
pwmOUT = int(pot_value/4)
pwm1.duty(pwmOUT)
pwm2.duty(0)
time.sleep(0.5)
pwm1.duty(0)
pwm2.duty(pwmOUT)
time.sleep(0.5)
print('Potentiometer Value =',pot_value)
print('PWM Value =',pwmOUT)