Fixed calibration after starting without computer and additional modules and devices

Hello dear sunfounder team!
Dear forum users!

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…?

With kind regards, Tom!

  1. Calibrate the servos: 0. Calibrating the PiCar-X — SunFounder PiCar-X Kit documentation
  2. 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.
  3. robot_hat can be expanded with modules for i2c, urat, SPI communication, as well as pwm and digital io modules, Hardware Introduction — SunFounder Robot HAT documentation

Hello siri!

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.