|
Re: Teleop move motor forward and backwards timed
I think you'll also discover that you will want a fourth step, to stop the motor after the 1.5 seconds. And as Mark said, if you take the motor reference out of each sequence and wire it across, the code will be smaller and cleaner.
By the way, putting this into teleop wouldn't simply slow it down. If you place an infinite loop into a function, the function becomes, ... , ...? Yep, it becomes infinite as well. So by placing an infinite loop in teleop, you would only call telop once and your teleop portion of your program would pretty much lock up waiting for the loop to finish.
Greg McKaskle
|