First Successful I2C Communication
The robot is build with four independent circuit boards. Three of them are driver boards that power and control one leg pair each. Each driver board contains a dual motor driver and one Arduino. The Arduino is programmed with the low-level logic to drive the legs, including a PID, homing encoder support, etc..
However, the way this robot should walk is that the two opposite tripods walk together. So something needs to sync the three driver boards. This is where the controller board comes in. Right now, it only has a single Arduino on it, but I have space for a Raspberry Pi Zero are well for future expansion.
The idea is that this controller board should send step commands to the driver boards via i2c. The first time I tried to get an Arduino to speak i2c, I got wierd results that I did not understand.
So off to the Makerspace to hook up an oscilloscope and see what was actually going on. It turns out that the pull-up resistors really were necessary to get decent signals, and apparently an i2c master should not send data unless the correct slave acknowledges that it is listening.
Below we see the little Arduino calling out all properly to its slave device, but getting no answer so it falls silent….
Some soldering and wiring later, the controller board was ready and I could hook it up to one of the driver boards. Some coding later, and the two boards can now send data between each other. I believe that the oscillosope display says “Hello World!” 😛