Ok I just tested. I forgot to mention that I want this one servo (my commands are bit misleading, I will change them) to rotate clockwise and counterclockwise. so when tempbyte = 1, rotate clockwise. when tempbyte = 2 , rotate counterclockwise
When I tested with the code below, when 'leftwheel' was received, it just set to halfspeed, and then when 'right wheel' was received, it just went full speed. it might've been the other way around. so how would i set to rotate clockwise and counterclockwise. I thought thats what this was doing with the code below
else if (tempbyte==leftwheel)
{
act_setSpeed(&servo,-64);
return 0;
}
else if (tempbyte==rightwheel)
{
act_setSpeed(&servo,64);
return 0;
}