print("Hello, ESP32!")
from machine import Pin,PWM,ADC
import time
pwm_pin=Pin(23,Pin.OUT)
pwm=PWM(pwm_pin)
pwm.freq(500)
while True:
#max 1023
pwm_value = 24
pwmOut = int (pwm_value)
pwm.duty(pwmOut)
print('PWM Value = ',pwmOut)
time.sleep_ms(100)
#if 1 cycle 1023 = 2msec
# 24 = ?? msec
# 24 = (2msec/1024) x 24