Page 1 of 1

Can't import PMW

Posted: Wed Jan 13, 2021 6:19 pm
by mc2software
I've flashed my ESP32S with esp32-idf4-20200902-v1.13. I'm just getting my feet wet with mp and trying out a classic multi=push button/led app. This is the result of

Code: Select all

from machine import Pin, PWM


at a >>> prompt:

Code: Select all

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: can't import name PMW

Re: Can't import PMW

Posted: Wed Jan 13, 2021 7:39 pm
by Roberthh
The PWM module is called PWM, like you wrote in the first box, not PMW.

Re: Can't import PMW

Posted: Wed Jan 13, 2021 8:09 pm
by mc2software
My Dyslexia strikes again. Can't believe how many times I thought I was writing PWM. Thanks!