diff options
Diffstat (limited to 'docs/esp32')
-rw-r--r-- | docs/esp32/quickref.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/esp32/quickref.rst b/docs/esp32/quickref.rst index 707ae27c08..56d8b0e4f6 100644 --- a/docs/esp32/quickref.rst +++ b/docs/esp32/quickref.rst @@ -383,7 +383,7 @@ for more details. Use the :ref:`machine.PWM <machine.PWM>` class:: - from machine import Pin, PWM + from machine import Pin, PWM, lightsleep pwm0 = PWM(Pin(0), freq=5000, duty_u16=32768) # create PWM object from a pin freq = pwm0.freq() # get current frequency @@ -409,6 +409,9 @@ Use the :ref:`machine.PWM <machine.PWM>` class:: pwm4 = PWM(Pin(4), lightsleep=True) # Allow PWM during light sleep mode + lightsleep(10*1000) # pwm0, pwm2 goes off, pwm4 stays on during 10s light sleep + # pwm0, pwm2, pwm4 on after 10s light sleep + ESP chips have different hardware peripherals: ======================================================= ======== ========= ========== |