
81Chapter 4: More Links, More Precision
Once your code has been uploaded, you should see both motors moving
together, with motor 1 moving from 90 degrees to 135 and motor 2 moving from
90 degrees to 45. As the motors move, look at the end effector of the robot. If
things are working as intended, you should see the end effector moving in a
straight line up and down, just like in the images above (Figure
4-18
).
Though the format of this new code looks similar to our last example, it’s the
logic within our loops that has changed. The first portion of the code, above the
void loop, is the same as before, but look at our two new for loops, and y