I've done a bit of research, but found nothing that really answered my specific problem.
Among other messes, I have a servo declaration in the start of my program that contains the following:
//---Servos: 12 x HS-5645MG (~750us - ~2200us)------
int ServoList[12] = {0, 1, 2, 12, 13, 14, 16, 17, 18, 28, 29, 30}; //Servo pin #
int ServoCenters[12] = {1800, 1900, 1250, 1200, 1100, 1750, 1200, 1100, 1750, 1800, 1900, 1250}; // The starting position of each servo that moves the body into a nice standing state
int Servo_OUT_UP_Limit[12] = {2200, 750, 700, 750, 200, 750, 750, 2200, 750, 2200, 750, 2200}; The physical or digital limits of each servo moving away or up from the body
int Servo_IN_DOWN_Limit[12] = {1000, 2000, 2200, 1500, 1100, 2200, 2000, 1100, 2200, 1500, 1900, 750}; // The physical or digital limits of each servo moving towards or down from the body
int ServoGroup[12] = {1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4,};
I need a way to control 12 servo in a 3-DOF quadruped, but I wanted to keep things relatively clean and use only a single function with multiple arguments to control each servo. The problem is that some of the servos are inverted, some (due to the asymmetrical nature of the quadruped) have physical limits. Some servos are used for Y movement and some for X shifts.
Is there a simpler way to address all the aspects of a servo in one call?
Ex: servoMove(sev_number, inverted?, Center?, distance_of_move)
taking into account boundaries and correcting by limiting movement.
My biggest problem is that I'm totally overwhelmed when 12 servos move at once, I'm trying to track errors and whatnot, but it's too hard to look at each servo.
I want to be able to use a number in a simple data range (say 0--->255) and have that be the same distance, move, and direction for every single servo.
I recently picked up and Arduino after a bit and am pretty rusty, I have a servo controller that's taking these commands over serial (SSC-32)