In the donkey car code on the openmv github (openmv-projects/line_follower_main.py at master · openmv/openmv-projects · GitHub) there is a line of code for the “native servo controller”. I am in need of guidance as to how to use the servo pins p7, and p8 on an h7plus from pyb. Starting at line 90 (openmv-projects/line_follower_main.py at master · openmv/openmv-projects · GitHub):
device = servo.Servos(machine.I2C(sda = machine.Pin(“P5”), scl = machine.Pin(“P4”)), address = 950x40, freq = 50)
and also later starting at line 203 (openmv-projects/line_follower_main.py at master · openmv/openmv-projects · GitHub):
throttle = THROTTLE_SERVO_MIN_US + ((throttle * (THROTTLE_SERVO_MAX_US - THROTTLE_SERVO_MIN_US + 1)) / 101)
steering = STEERING_SERVO_MIN_US + ((steering * (STEERING_SERVO_MAX_US - STEERING_SERVO_MIN_US + 1)) / 181)
How would one implement the regular builtin servo pins of p7 and p8 into the code? Does: servo1 = pyb.Servo(1) go in place of the Servos script? I am looking to implement this code with a differential drive 360 servo with out a servo controller just using pins p7, and p8 to control the servos. I am having trouble understanding how to translate this over. Anyone have any ideas? Is this even possible? I wish you all a wonderful summer. Thank-you for your time.