I got the robot twitching.
I ran into a ton of problems with the Raspberry Pi (which is its own drama, given that you can't buy them anymore), and ended up having to reinstall the OS from scratch. It's really annoying that there's stuff that relies on the GUI, but this is all to get the hardware setup and calibrated, and I won't need it in the future. Still.
Once that was done, I got the servos setup. While wiring everything, the left side of the robot kept twitching.
So I finished assembling everything, got the head assembly done up, and then powered it up. I ran the servo test code and... nothing. Well, not nothing - a timeout while trying to connect to the servo controller.
pi@lucifer:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
So I took the battery pack off, checked all the wiring and sure enough, I had put the HC-SR04 cable in the wrong spot (on an I2C port, not on the sensor port). Fixed the connection and booted back up.
pi@lucifer:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 41 -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
Now the servo test code... sort of works? Gonna have to reverify the servo wiring.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.