Can some one give me a hand with this code?

PaulS:

  int iFinger;

How many iFingers are you planning for the iGlove to have? How do you intend to deal with more than 255 servos, in terms of controlling or powering them?

    if (servo[i].iFinger < ciDefault[0]) servo[i].iFinger = ciDefault[0]; 

else if (servo[i].iFinger > ciDefault[1]) servo[i].iFinger = ciDefault[1];



Perhaps you'd like to meet the [constrain()](http://arduino.cc/en/Reference/Constrain) function. No sense reinventing the wheel.



Serial.print(servo[i].servoVal);





servo[i].servoAng = Serial.read();



Serial.print() will take a value like 200 and convert it to '2', '0', '0' and send those values to the serial port. You can not then read them all with one statement.

Serial.write() will send the byte-sized value as a single byte, that you can then read with one call.

Be sure to read and answer AWOL's question, too.

Well I am only using 5 servos, one for each finger and one for the thumb.

I have been told to use the constrain function before but I don't really understand how to use it. Could you give me some help?

Are you saying that the Serial.print() won't work and I should replace them with Serial.byte()?

Thank you for all of your help so far!