Quote:
Originally posted by Jeremy J
Well, after a short collaboration with my team's lead programmer, we agree that for the robot, 255 exceeds the max value of what the robot controller can understand. 254 is the max value, I believe. Try changing it to that and then running the program. That should help
|
Yes, this is the case of a common fencepost error. In most programming languages, including this one, counting starts at zero instead of one. So if you want 10 numbers, it is really 0 through 9, not 1 through 10. So there are 255 values that you can assign a PWM, but it is 0-254
