I have sorted the problem out somewhat. Is there a way to limit a range of numbers? Such as:
Code:
If (rps < trps)
speed = speed + 1
elseif (rps > trps)
speed = speed - 1
elseif (rps == trps)
speed = speed
I want to keep it only in forward motion so the values must be restricted to 127 to 255. Thank you!