Quote:
|
Originally Posted by Astronouth7303
Woulden't it be temp = 255 - p1_y? Because other wise you can have negative numbers.
|
If p1_y == 0, then that would evaluate to 255, which is an invalid PWM output. If you're using an unsigned data type, it can't be negative, anyway.