|
Re: Teleop move motor forward and backwards timed
The sequence looks okay, but has a few problems.
The Joystick button will never change, because the Get is outside the While loop. You'll keep using the value of the button at the time the loop first started.
Just add another Joystick Get inside the While loop.
The cimtest RefNum Get would be better outside the While loop and wired in to Motor Set Output. The RefNum is something that doesn't change, so you don't have to keep retrieving it everytime.
I'd increase the Timer to 20ms, because that's as fast as the button can possibly change.
The button 7 check looks good, but since the wires are on top of one another it's hard to be positive.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 16-01-2014 at 22:58.
|