View Single Post
  #3   Spotlight this post!  
Unread 15-02-2014, 19:57
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Motor Speed Values

Quote:
Originally Posted by LFRobotics View Post
What is the max speed value I can give a motor?
The set method calls the setSpeed method of the PWM class.

If you look at the source code of this class, you can see that any input is constrained to be between 1.0 to -1.0.

Code:
final void setSpeed(double speed) {
            // clamp speed to be in the range 1.0 >= speed >= -1.0
            if (speed < -1.0) {
                speed = -1.0;
            } else if (speed > 1.0) {
                speed = 1.0;
            }
...
1.0 and -1.0 don't directly correlate to an actual motor speed. They will just dump 100% battery voltage to the motor in the specified direction. The speed the motor will travel at under this condition is dependent on a number of factors like gearing, load, battery voltage, etc.
__________________
http://team2168.org

Last edited by otherguy : 15-02-2014 at 19:59. Reason: clarification
Reply With Quote