Each leg on this robot has 3 motors; a shoulder, an elbow, and an ankle
To make things easier I labelled them up like this:
There are 18 separate motors to control:
First thought was to create a function that controls each limb. At the least every limb should move in the same way. However, whilst limbs move together from the gait perspective (Figure 2) I don’t think we can do that from an Arduino perspective. I don’t think I can create a function that says move limbs L1, R2, L3 at the same time. I think I’ll need a function that does that. But then separately what it’s doing is moving “Left Front Shoulder, Right Middle Shoulder, Left Back Shoulder” together, then “Left Front Elbow, Right Middle Elbow, Left Back Elbow”, etc. until that function is complete.
I think I’ll have a multidimensional array with degrees in it for each joint. What I might do though is write a routine which sets each joint to 0. Then unscrew and reattach the joints so I know where zero is on each motor. Either way, I probably need a few lists to define:
the start and end position of each joint for a forward motion
the start and end position of each joint for a circular motion
the start and end position of each joint for being sat still.
That currently looks like this:
Maybe a piece of code that takes serial input and resets the device to zero’s.
Due to its built in Bluetooth, I’m thinking about having a raspberry pi zero-w connected to an Arduino nano over USB Serial:
Then I can both ssh into the robot to tell it what to do. And I can also write a phone app to act like a remote control, connecting over Bluetooth. The v5 of the robot car did that.