PWM示例代码,报错cannot import name Timer
# PWM Control Example
#
# This example shows how to do PWM with your OpenMV Cam.
import time
from pyb import Pin, Timer
tim = Timer(4, freq=1000) # Frequency in Hz
# Generate a 1KHz square wave on TIM4 with 50% and 75% duty cycles on channels 1 and 2, respectively.
ch1 = tim.channel(1, Timer.PWM, pin=Pin("P7"), pulse_width_percent=50)
ch2 = tim.channel(2, Timer.PWM, pin=Pin("P8"), pulse_width_percent=75)
while (True):
time.sleep(1000)
请提供你的硬件版本,固件版本。
固件3.15.0-
OpenMV IDE2.2.0


硬件版本,是OpenMV2还是OpenMV3还是OpenMV4。
@kidswong999 OpenMV3
我使用OpenMV3没有出现错误。
请升级到最新的固件,如果解决不了,联系售后维修。
我也是一样的问题。 求解