|
Re: Breaker Switches and Buttons to Motors
What do/did you have wired to the DIO pins?
The "one way works haltingly at half speed" symptom points to a common programming mistake. You're trying to run the motor one direction with the first case block, and the other direction with the second case block, right? The problem is probably that both blocks are turning off the motor in their False case. You have two places setting the motor speed, and one of them "wins". Imagine you're trying to run the motor forward. The "turn it off when not requesting backward" case turns it off, but the "turn it on when requesting forward" immediately turns it on and it works as you expect. But when you try to run the motor backward, the "turn it on when requesting backward" case turns it on, but the "turn it off when not requesting forward" immediately turns it off and it only gets a little twitch of motion.
Do you want to use two joystick buttons to control a motor's forward/reverse motion? There are examples of how to do exactly that posted on the Chief Delphi forums; do a forum search for "button motor" and you'll find lots of helpful advice.
|