View Full Version : making speed controller digital
CharlieWilken
18-02-2002, 00:11
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
Adam Krajewski
18-02-2002, 06:17
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 (http://www.innovationfirst.com/FIRSTRobotics/pdfs/buttonpwm.pdf) at innovationfirst.com.
Greg McCoy
18-02-2002, 08:05
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.
GhettoTech
01-03-2002, 18:01
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.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.