In your example sketch, for Serial to work, I needed to first include the standard Arduino library and then start Serial with Serial.begin(9600) in the setup() function. So the script now looks like this:
// Arduino/Teensy example for Arduino Braccio
#include <Arduino.h>
// Include the library InverseK.h
#include <InverseK.h>
void setup() {
Serial.begin(9600);
// Setup the lengths and rotation limits for each link
Link base, upperarm, forearm, hand;
Rest is unchangend
In your example sketch, for Serial to work, I needed to first include the standard Arduino library and then start Serial with Serial.begin(9600) in the setup() function. So the script now looks like this: