Quote:
|
Originally Posted by Calvin
pwm01 = ((-1 * p2_y) + 255);
pwm02 = ((-1 * p1_y) + 255);
|
You almost have it, add 254 instead. The controls and victors operate on values from 0 to 254. To test whether this works, try your formula in excel; it can be a great tool for determining if your algorithms are correct.