RobotPy doesn't PWM?

Hi! We have our robot driving with robotpy! But we have a major problem. The robot doesn’t slow down when we set it to .125 or something like that. Code: http://pastebin.com/PqNEPmY5. Any help will be greatly appreciated! Thanks a bunch in advance!

I don’t know Python, but I can tell you what the issue is based on WPILib. The code you have posted will construct two speed controllers, set their outputs to .125, construct a Robot Drive out of those speed controllers, then in Teleop set their outputs based on the joystick value.

Reading the above,you may notice that setting their outputs to .125 there doesn’t really accomplish much.

If you want to scale your joystick values, you need to get the joystick values (using getX and getY) scale them, then pass them into an alternate version of the ArcadeDrive method that takes doubles as parameters.

So I exchanged the old arcadedrive for “self.robot_drive.arcadeDrive(self.stick.getX(),self.stick.getY())” but it still doesn’t slow down.

Closer, but that’s still missing the “scale them” part. Try arcadeDrive(.125self.stickgetX(),.125self.stick.getY()). That should scale the joystick values down by a factor of 8 (what it looks like you were trying to do) before passing them to the arcadeDrive method.

Thanks! It worked!