View Single Post
  #1   Spotlight this post!  
Unread 06-03-2009, 20:07
dboisvert dboisvert is offline
Registered User
AKA: Dan Boisvert
FRC #2405 (Divided by Zero)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Michigan
Posts: 57
dboisvert is an unknown quantity at this point
Joystick Button Press

I am trying to accomplish a simple button task. When someone pushes a button I want it to keep doing the action (IE In this case "Relay Forward" & "Relay Reverse") until the microswitch is activated. Right now it stops as soon as you release the button.


What the code looks like right now is this
Code:
if button1 == 1 & microswitch1 = 0
  Relay Forward
else if button2 == 1 & microswitch2 = 0
  Relay Reverse
else
  Relay Off
Any suggestions?
Reply With Quote