|
Re: Running loop with button..
Don't put that in Teleop. The 3900 millisecond delay in there will bring everything else in the code to a halt, including the communication with the Driver Station, and the system watchdog will shut down the robot's outputs.
Do you know how to use the Flat Sequence structure? One of those in a neverending While loop placed in the Periodic Tasks vi is probably the right way to implement what you want. The first frame of the sequence will stop the motor and have a loop waiting for the button to be pressed. The second frame will run the motor and have a loop waiting for the limit switch. The third frame will reverse the motor and delay 3.9 seconds. If that's not enough of a hint, let me know.
|