|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple Inputs for a Motor
So our team wanted a backup system for our shooter which would be controlled by the throttle(knob) on the joystick. I can wire this up fine, but I'm wondering how I'd incorporate the code for when I want the shooter to set its speed automatically by the distance, since the motors would then receive two conflicting inputs.
Say the throttle is set at 0 speed, but I press the button for the automatic shooting, saying we need about .5 speed to get in the basket, how would I have the code make this override the throttle input? |
|
#2
|
||||
|
||||
|
Re: Multiple Inputs for a Motor
The button selects either the "button speed" or the "non-button speed".
|
|
#3
|
||||
|
||||
|
Re: Multiple Inputs for a Motor
Just copy and paste this into wherever. Wire up your auto-shooter speed to BOTTOM (I did this too quickly), and manual speed control to TOP. That way, when button is pressed, the Auto Speed control is overridden.
|
|
#4
|
||||
|
||||
|
Re: Multiple Inputs for a Motor
You're fast, Ether!
|
|
#5
|
|||
|
|||
|
Re: Multiple Inputs for a Motor
Thanks a lot, was exactly what I was looking for.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|