0_calibration.py shutdown pidog - raspberry pi 5

Hi, this is my first raspberry pi project. I assembled the pidog and we made it through all the steps and are now at the 2. Calibrating PiDog — SunFounder PiDog Kit 1.0 documentation step. Whenever we run the 0_calibration.py script the head tilts to the side and the legs twitch, but then I lose the SSH connection because I think the raspberry pi is shutting down (there is a red light on the front of the raspberry pi). Complete beginner so any help would be much appreciated!

Is the battery 100% charged? Let it charge overnight and see what happens.

Ok we’re getting much further now. However running the servo zeroing script tilts the head of the PI dog to the side. It gets stuck and cannot move further to the side but trying to bring it back does not work.

Unfortunately I think you may have assembled the head servo outside of it’s calibration range. It will probably need to be reassembled.

We initially suspect that the issue occurred because the servo zeroing and assembly process was not performed correctly.

The correct steps for servo zeroing and reassembly are as follows:

We recommend removing the servo from the head and redoing the zeroing and assembly according to the steps below:

  1. Power on the Robot HAT5.
  2. Briefly press the ZERO button twice.
  3. Connect the servo cable to a PWM pin. At this point, you will see the servo return to its zero position.
  4. Do not unplug the servo after zeroing. First, assemble and secure the servo according to the assembly instructions, then disconnect the servo that has been zeroed and assembled.
  5. Repeat steps 3 and 4 to zero, assemble, and secure the remaining servos.

Repeat this process for all 12 servos. Only after the PiDog is fully assembled should you run the calibration example to calibrate the servos.