View Single Post
  #5   Spotlight this post!  
Unread 08-03-2012, 14:12
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Question 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?
Attached Thumbnails
Click image for larger version

Name:	Tele.png
Views:	23
Size:	67.6 KB
ID:	12258  Click image for larger version

Name:	Other Case.png
Views:	16
Size:	27.9 KB
ID:	12259  
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
Reply With Quote