sparkfun/RedBot — pull request #9 by ZachWick (2014-01-07 20:12:34+00:00)
Title: Constrain PWM values for drive speed to 255

Since the private methods of the RedBotMotor class call directly down to analogWrite which in turn sets register values without checking that the given PWM duty cycle is within [0-255].

This may not be needed, but it is at least a good practice to enforce the bounds that are mentioned in the documentation for the public RedBotMotor methods and the analogWrite method.