Help with donkey car code

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

if NATIVE_SERVO_CONTROLLER:
import servo
import machine
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):

if NATIVE_SERVO_CONTROLLER:
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)
device.position(0, us=throttle)
device.position(1, us=steering)

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.

Yes… um, not sure what you want to know.

Yes , I will try my best to explain my problem. Good day to you.

When, device.position(0, us=throttle) and
device.position(1, us=steering) are called how do you just call the servos on P7 and P8? I think it had something to do with the device variable being initialized as below.

device = servo.Servos(machine.I2C(sda = machine.Pin(“P5”), scl = machine.Pin(“P4”)), address = 950x40, freq = 50)

How do I assign both p7 and P8 servo pins instead of the i2C? My servos have their own power and ground cause I’m not using a servo shield.

I hope this makes sense and isn’t a waste of your time.

Thanks again for the help, it is greatly appreciated.

Hi, you just remove the I2C code and put the example code in from board control servos.

… Is there something in particular you are having issues with? The API for each is similar.

Yes, you have to delete the code for control using the servo shield. That is not compatible, but, the higher level code is.