WeActStudio / MiniSTM32H7xx

STM32H750VBT6/STM32H743VIT6 Core Board With 0.96'' TFT,TF Card,8MB QSPI FLASH,8MB SPI FLASH,DVP Port
GNU General Public License v3.0
288 stars 100 forks source link

OpenMV中Servo无法使用(Servo cannot be used in OpenMV) #30

Closed linxizhixi closed 2 years ago

linxizhixi commented 2 years ago

环境

s1 = Servo(1) # P7->(PD12) s2 = Servo(2) # P8 while(True): for i in range(-90,90): s1.angle(i) s2.angle(i) time.sleep(10) for i in range(90,-90): s1.angle(i) s2.angle(i) time.sleep(10)

### 现象
舵机无任何反应
## PWM测试
### 代码
```python
from pyb import Pin, Timer

p = Pin('P7') # P7 has TIM4, CH1
tim = Timer(4, freq=1000)
ch = tim.channel(1, Timer.PWM, pin=p)
ch.pulse_width_percent(50)

现象

上电时转到固定角度

linxizhixi commented 2 years ago

我把固件更新到最新(4.3.1)就可以使用了