I bought a SunFounder PiCar-X. When I switch on the robotor (PI), would I like it to align itself to my preset calibration (= all three servos!!)? I would also like to know from you what additional functions can be installed on the free pins? Modules? Devices? etc…?
After calibrating the servo, use set_dir_servo_angle(0), set_cam_pan_angle(0), set_cam_tilt_angle(0) in your program to set the servo angle parameter to zero, then the servo will turn to zero with the calibrated offset.
I tried your commands, see picture attached, unfortunately this method doesn’t work! I would like an automatic calibration when starting the robot without entering any commands, or without an activated PC or cell phone, etc.
You misunderstand us, we use set_dir_servo_angle(0), set_cam_pan_angle(0), set_cam_tilt_angle(0) in the program to set the servo angle parameter to zero, then the servo will be zeroed at the calibrated offset. is an interpretation of the code, not an instruction.
If you want to execute the calibration command, as follows:
cd ~/picar-x/example/calibration
sudo python3 calibration.py
and follow the steps of our tutorial, the numeric keys of the keyboard correspond one by one to each servo and motor of the robot. https://docs.sunfounder.com/projects/picar-x-v20/en/latest/python/python_calibrate.html#calibrate-motors-servo
You only need to calibrate the robot for the first time, after that it will automatically calibrate the servos and motors when you turn it on.