mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
examples/ServoShield: Change to SoftI2c for RT. (#2206)
Use SoftI2C to support OpenMV RT.
This commit is contained in:
parent
357b6f9b07
commit
9937f49af1
@ -13,9 +13,9 @@
|
||||
|
||||
import time
|
||||
from servo import Servos
|
||||
from machine import I2C, Pin
|
||||
from machine import SoftI2C, Pin
|
||||
|
||||
i2c = I2C(sda=Pin("P5"), scl=Pin("P4"))
|
||||
i2c = SoftI2C(sda=Pin("P5"), scl=Pin("P4"))
|
||||
servo = Servos(i2c, address=0x40, freq=50, min_us=650, max_us=2800, degrees=180)
|
||||
|
||||
while True:
|
||||
|
Loading…
Reference in New Issue
Block a user