Re: How to make sequence happen ONCE, Period!
Alright, now that I have that settled, the next question would be for our Teleop program. It is not to solve a problem, but rather confirm if what we did was correct.
Just like in the Auto program, I have the same 2 limit switches put to use. When Our lift activates both limit switches, we want to prevent the Joystick from inputting any more positive value (to prevent breaking our lift, burning out motor, etc.), just the negative to get it down again.
In the Case structure, I have placed the two limit switches just like in Auto, and if they are both true, a second case is started. The statement we thought of was: "If both of the limit switches are pressed, another check is made. It checks to see if the Joystick value is less than or equal to zero. If the Joystick value is less than or equal to zero, then the input is allowed. If not, the motor is set to zero input."
We have done the same thing to the third limit switch at the bottom of our lift, so it can be changed accordingly.
So, have we set this case up right?
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
|