
185Chapter 9: Inverse Kinematics for 3D Movement
Serial.print("Value Selector: ");
Serial.print(valueSelector);
Serial.print(" Theta: ");
Serial.print(theta);
Serial.print(" Alpha: ");
Serial.print(alphaFinal);
Serial.print(" Beta: ");
Serial.println(beta);
}
}
This latest version of our code may look longer than some of our other
examples, but all we have here is a combination of our rotary-encoder code
from the previous chapter and the three-DOF inverse-kinematics code
from the beginning of this chapter. The biggest difference here is that in our
previous rotary-encoder code, we used the encoder’s knob to increase and
decrease the angle of our ...