Code: Select all
from machine import Pin, PWM
pwm = PWM(Pin(13), freq=1, duty=512)
# pwm.duty(512)
Code: Select all
ledc: ledc_set_duty(339): LEDC channel error
Code: Select all
from machine import Pin, PWM
pwm = PWM(Pin(13), freq=1, duty=512)
# pwm.duty(512)
Code: Select all
ledc: ledc_set_duty(339): LEDC channel error
Code: Select all
MicroPython ESP32_LoBo_v2.0.4 - 2017-10-08 on ESP32 board with ESP32
Type "help()" for more information.
>>>
>>> from machine import Pin, PWM
>>> pwm = PWM(Pin(13), freq=1, duty=512)
>>>
>>> pwm.duty(100)
>>> pwm.freq(10)
>>>
>>> pwm
PWM(13, freq=10, duty=100)
>>>
>>> pwm.deinit()
>>> pwm
PWM(13)
>>>
>>> pwm = PWM(Pin(13), freq=10, duty=512)
>>> pwm.duty(100)
>>> pwm
PWM(13, freq=10, duty=100)
>>>