Now we jump off the deep end and start writing some code.
We can begin by talking about how we send commands to the arm. The motors I have selected for TinMan are stronger versions of standard hobby servo motors, with metal gears. Servo motors are commanded by setting an angle for the motor’s output shaft to assume. The angles run from 0 to 180 degrees. However, the commands for the motor positions run from 1 to 255, so they fit into a single 8-bit value. We’ll be converting these byte-based motor commands to and from angles in the program.