Hi again!
I’ve hit a bit of a speedbump. I had my tracked rover and arm working very well using a botboard 2 and PS2 control, running the standard rover_v1.2.
The next step involved slapping an SSC-32 on there. All wiring seems correct, I’ve got a power led that’s on normally and blinking fast when communicating.
I’ve only got the base servo connected so far, just to see if I can get it going. If all my servo’s suddenly decide to explode at thesame time, it’d create so much black smoke I wouldn’t be able to find the exit anymore
I’ve ran a quick test and I can make the servo move according to the deviation of the PS2 stick using a very simple and crude…
BaseSSC = ((Dualshock(3)) * 2000 / 255 )+500 MIN 500 MAX 2500
serout SSC_OUT,i38400,"#0P",DEC BaseSSC, 13]
serout s_out, i9600, [SDEC BaseSSC,13]
Works like a charm, I figured the SSC needs a range of 500 to 2500.
However, how do I use the more complex values from the rover_v1.2 program? I can’t seem to figure out what’s being sent to the pins on the botboard there:
;Drive servos
hservo [BasePin\ (BasePosition1*stepsperdegree1)/100 + Base_Offset\_mBaseSpeed, |
ShoulderPin\ (ShoulderPosition1*stepsperdegree1)/100 + Shoulder_Offset\_mShoulderSpeed, |
ElbowPin\ (ElbowPosition1*stepsperdegree1)/100 + Elbow_Offset\_mElbowSpeed, |
WristPin\ (WristPosition1*stepsperdegree1)/100 + Wrist_Offset\_mWristSpeed, |
GripperPin\ (GripperPosition1*stepsperdegree1)/100 + Gripper_Offset\_mGripperSpeed, |
WristRotatepin\(WristRotatePosition1*stepsperdegree1)/100 + WristRotate_Offset\_mWristRotateSpeed]
This is the original. The range of BasePin appears to be -15842 to 15978 on the base pin. What’s that, and what would be the best way to get it into the SSC-32 syntax? I’m also still clueless on the speed factor (_mBaseSpeed) as the SSC-32 only accepts one global speed setting per group command. Will I need to adjust anything else aswell, such as offsets and the like, or will it all be sorted again as soon as the correct formula for the end command is set? Thanks in advance!