can't import name pwm
Posted: Fri Oct 22, 2021 1:04 pm
For some reason I cannot find PWM module:
The same on another board:
Could somebody explain what I'm doing wrong?
Code: Select all
MicroPython v1.17-68-g35fb90bd5-dirty on 2021-09-24; NUCLEO-F401RE with STM32F401xE
Type "help()" for more information.
>>> from machine import pwm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: can't import name pwm
>>> dir(machine)
['__class__', '__name__', 'RTC', 'ADC', 'DEEPSLEEP_RESET', 'HARD_RESET', 'I2C', 'PWRON_RESET', 'Pin', 'SOFT_RESET', 'SPI', 'Signal', 'SoftI2C', 'SoftSPI', 'Timer', 'UART', 'WDT', 'WDT_RESET', 'bitstream', 'bootloader', 'deepsleep', 'disable_irq', 'enable_irq', 'freq', 'idle', 'info', 'lightsleep', 'mem16', 'mem32', 'mem8', 'reset', 'reset_cause', 'sleep', 'soft_reset', 'time_pulse_us', 'unique_id']
>>>
Code: Select all
MicroPython v1.17-6-g9792c9105 on 2021-09-03; NUCLEO-L476RG with STM32L476RG
Type "help()" for more information.
>>> from machine import pwm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: can't import name pwm
>>> dir(machine)
['__class__', '__name__', 'RTC', 'ADC', 'DEEPSLEEP_RESET', 'HARD_RESET', 'I2C', 'PWRON_RESET', 'Pin', 'SOFT_RESET', 'SPI', 'Signal', 'SoftI2C', 'SoftSPI', 'Timer', 'UART', 'WDT', 'WDT_RESET', 'bitstream', 'bootloader', 'deepsleep', 'disable_irq', 'enable_irq', 'freq', 'idle', 'info', 'lightsleep', 'mem16', 'mem32', 'mem8', 'reset', 'reset_cause', 'rng', 'sleep', 'soft_reset', 'time_pulse_us', 'unique_id']
>>>