examples/ServoShield: Change to SoftI2c for RT. (#2206)

Use SoftI2C to support OpenMV RT.
This commit is contained in:
王开智 2024-07-15 06:06:01 +08:00 committed by GitHub
parent 357b6f9b07
commit 9937f49af1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: