|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Motor Speed Values
What is the max speed value I can give a motor?
Like is Code:
motor.set(10); Code:
motor.set(1); |
|
#2
|
||||
|
||||
|
No. The motor values go from -1 to 1. Giving it a value of 10 is either going I cause an error or be the same as 1.
|
|
#3
|
||||
|
||||
|
Re: Motor Speed Values
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;
}
...
Last edited by otherguy : 15-02-2014 at 19:59. Reason: clarification |
|
#4
|
||||
|
||||
|
Re: Motor Speed Values
Okay - THANKS!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|