'PWM' object has no attribute 'init' #10570
Unanswered
TRadigk
asked this question in
RP2040 / Pico
Replies: 1 comment
-
This is no bug. As documented, not every port supports every module's methods. And the init() method is almost everywhere redundant, because the settings given in the init() call can also be given in the constructor call. Sometimes it is even confusing using the init() method, because in the internal semantics differs between ports & devices. Sometime properties not mentioned in the init() call are not changes, sometimes they are set to default values. This inconsistency grown over years is more of a problem. Given that, having not init() method can be seen as a benefit. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi dear developers of micropython,
using my RP2040 with micropython 1.19.1 I found the error message in the title. I don't know if this is a documentation error, or it was intended to be part of the firmware.
code:
result:
Searching for this error I found no corresponding issue. Since the PWM pin will work without calling init(), I don't think it is a critical issue. You will have the insight if it is just an issue of documentation. I referred to: https://docs.micropython.org/en/v1.19.1/library/machine.PWM.html
firmware file name: rp2-pico-20220618-v1.19.1.uf2
Board: Raspberry pico (RP2040)
Beta Was this translation helpful? Give feedback.
All reactions