|
Re: How'd you do it?
I don't even know what a PID loop is?
I had something like this:
if (p1_sw_trig == 1)
{
if ((((int)PAN_SERVO - 131)>= 1)||(((int)PAN_SERVO - 131)<=-1))
{
RIGHT_W = (127+(12*(((int)PAN_SERVO - 131))));
LEFT_W = (127-(12*(((int)PAN_SERVO - 131))));
}
else
{
RIGHT_W = 127;
LEFT_W = 127;
}
I'm thinking maybe 12 is the D value, however, when I decrease it too much, the robot wont turn when it gets to the point of being servo steps off.
|