Sorry to say, I have not touched RC servos in a very very long time.
What you probably need to do is figure out the calibration differences between the two types of servos.
That is you need to compute the code needed to convert from degrees to servo units.
So for example if hitec rc servos that maybe have 180 degrees movement with output range of 500-2500us,
And yours has a different range of values to get you +90 -90...
Than you need to compute these values.
The formula that is for this is shwon in the function
Code:
//------------------------------------------------------------------------------------------
//[OutputServoInfoForLeg] Do the output to the SSC-32 for the servos associated with
// the Leg number passed in.
//------------------------------------------------------------------------------------------
#define cPwmDiv 991 //old 1059;
#define cPFConst 592 //old 650 ; 900*(1000/cPwmDiv)+cPFConst must always be 1500
// A PWM/deg factor of 10,09 give cPwmDiv = 991 and cPFConst = 592
// For a modified 5645 (to 180 deg travel): cPwmDiv = 1500 and cPFConst = 900.
#ifdef c4DOF
void ServoDriver::OutputServoInfoForLeg(byte LegIndex, short sCoxaAngle1, short sFemurAngle1, short sTibiaAngle1, short sTarsAngle1)
#else
void ServoDriver::OutputServoInfoForLeg(byte LegIndex, short sCoxaAngle1, short sFemurAngle1, short sTibiaAngle1)
#endif
But again it has been years since I have done so... SO it might take you some trial and error.
Bookmarks