Update motor class to bound pwm

Update motor class to bound pwm between 0 & 255.