Quote:
Originally Posted by T.E.R.T.O.L.A
How does one set the speed of a motor controlled by a button?
|
I'm not sure I understand the question. A button has only two states. If you want to set the motor's speed beyond simply "running" and "not running", you'll need some other kind of control. Usually one uses a joystick for that.
Perhaps you're asking how to change what value is sent to the motor controller when the button tells it to be "running"? That's controlled by the orange constant
1 wired into the True input of the triangular Select function in the posted code. You can make it anything from -1 to +1. If you want to be able to modify the value under driver control, the throttle input of an Attack 3 joystick is Axis 3. Wire it to the Select instead of the constant, and you can set the run speed using the throttle.
Quote:
|
Is there a rpm number somewhere that we can change?
|
To control RPM, you'll need a way to measure the RPM and some programming to change the motor output value to increase it when it's too low and decrease it when it's too high. For your application, do you really need a specific RPM, or are you just asking about being able to make it run relatively faster or slower?