making speed controller digital

Is it possible to wire a speed controller to a digital output. I want to put one of my motors on one of the the digital switches of the joystick and don’t need to control speed. Thanks in advance

It’s not possible to wire a speed controller to a digital output, but it is possible to create ‘digital control’ of a speed controller.

For a very nice explaination and complete software, go here at innovationfirst.com.

Yeah, if you don’t want the motor going full power when you press the button, you can also just say

if p1_sw_trig = 1 then PWM12 = 150

or something like that. Otherwise just use a spike.

if p1_sw_trig = 1 then PWM12 = 150

Just a little note. That won’t work in PBasic. PBasic’s If/Then statemtents include an automatic “Goto.”

If p1_sw_trig = 1 then (Goto) is implied

If p1_sw_trig = 0 then skip:
PWM12 = 150
skip:

that would be one way to work around that problem. (Similar to how the PWM limit switches are programed)

Otherwise just use a spike.

If I’m not mistaken, most of the motors are not allowed to be hooked up to a spike. I think you can for one or two of them, but not all.