Now that we have connected to our car and know how to navigate the system, we can zero our servos before we attach them! Servo zeroing is important because it is possible that our servos have been shipped from the factory in the incorrect position. This will help us avoid having to do more calibration later on. Let's begin!
First, we need to be SSH-ed into our car so make sure your car is on and that you have logged in successfully!
Next, we need to navigate to the servo-zeroing Python file. This program will allow us to perfectly set our servos before attaching them to the car.
To get to this file you will simply need to run the following commands:
cd picar-x
cd example
Once you have navigated to correct directory we can run the servo-zeroing.py file by typing the following command:
sudo python3 servo-zeroing.py
You may notice that nothing really happens when you run this file. This file runs in the background and tells any servo that gets attached to D11 on our robot hat to turn to 0!
What this means is that before you permanently attach a servo to a servo arm, you should plug that servo into D11 and keep it plugged in until you have securely attached the arm. This will need to be done for a total of 3 servos, which we will do in the following steps.