Ok, so I can’t figure this out. I don’t see anything I am doing wrong to change the servo speed but it doesn’t work. Here is what I have got.
int stepToSlow(ssc *s, int controller, int servo, int pos) {
if(!s->connected)
return 0;
if(pos < 0)
sendCommand5(s,(char)controller,0,(char)servo,(char)0x0F); //turn servo off
else{
sendCommand5(s,(char)controller,0,(char)servo,0x4F); //turn servo on
usleep(100); //wait for signal to propogate
sendCommand5(s,(char)controller,1,(char)servo,(char)1); //set speed
usleep(100); //wait for signal to propogate
sendCommand6(s,(char)controller,4,(char)servo,(char)(pos/128),(char)(pos%128)); //give position
}
return 1;
}
Yes the position and everything is getting passed in fine because the servo moves to the proper location, it just doesn’t does it at the default speed. sendCommand5() is the exact same as sendCommand(). I just didn’t see that there was a sendCommand() function that did what I needed it to do.