Hello, my pidog fails to initialise both the rgb_strip and imu_sh3002, and does not perform any actions. This is the output I get if I run the 3_patrol.py script. I also get similar failures with the other example scripts:
sudo python 3_patrol.py config_file: /home/patri/.config/pidog/pidog.conf robot_hat init … done imu_sh3001 init … fail rgb_strip init … fail dual_touch init … done sound_direction init … done sound_effect init … pinctrl set 20 op dh done ultrasonic init … done
distance: 35.46 cm
ERROR: ‘Pidog’ object has no attribute ‘rgb_strip’
Stopping and returning to the initial position …
Quit
If I have the rgb strip and imu module connected to each other and the robot_hat, then the pidogs servos do not function. If I just disconnect just the IMU module the servos will function. The IMU module power light never comes on when connected.
I am pretty bummed, I was setting this up for my son, got everything built and ran into this exact error and not sure why but both imu_sh3001 init … fail rgb_strip init … fail … Would really like some clarity on how to move forward
Mine shows:
config_file: /home/pi/.config/pidog/pidog.conf
robot_hat init … done
imu_sh3001 init … fail
rgb_strip init … fail
dual_touch init … done
sound_direction init … done
sound_effect init … pinctrl set 12 op dh
done
ultrasonic init … done
ERROR: ‘Pidog’ object has no attribute ‘rgb_strip’
Please confirm whether the 6-DOF IMU is properly connected to the 11-channel light board.
Try changing the connection to another interface on the 6-DOF IMU and check how it works.
Connect the 6-DOF IMU cable directly to the I2C interface of the robot hat, then run the sample code for testing the 6-DOF IMU module to see if it operates correctly:
cd ~/pidog/test
sudo python3 imu_test.py
If the 6-DOF IMU module is detected and works, this indicates that the issue lies with the interface of the 11-channel light board.
Change the wiring of your 11-channel light board to another interface and connect it directly to the I2C interface of the robot hat. Then, run the sample code for the 11-channel light board module to see if it functions correctly:
This might help someone else with exactly the same errors when there is no real fault on the RGB or IMU board.
I disconnected the 4 pin cables and closely examined the pins. One of the pins in the socket was bent to one side and so not inserted into the plug.
Either :-
one of the cables or the pins in the socket must have been minutely misaligned on the RGB board so when assembling it allowed the pin to bend out of the way instead of inserting or
possibly factory testing might have misalgned the pin
Will never know fopr sure.
This meant that neither the RGB or IMU boards were recognised as the BUS daisy chains through the RGB to the IMU. I ‘carefully’ realigned the pin with a small watchmakers screwdiver and reassembled and all works OK. Even though I took great care when assembling I did not notice any excess force being required when inserting the plug so did not realise there was an issue.
Both the RGB and IMU test scripts failed before fixing the problem.