
107Chapter 6: Intermediate Inverse Kinematics
much more complicated than some of our previous lines of code, if you go
through step by step, you’ll see that we’re taking each action we developed in
our equations and converting it into code our Arduino can understand.
Once we have values for all our variables and have completed our main
calculations, all that’s left is combining our subangle variables into final-
angle variables that will be sent to our actuators. As you may recall from our
previous calculations, some of our final-angle calculations are dependent on
the value of our x variable. Thankfully, three sets of conditional statements