Go to Post I think sportsmanship is only one facet of the gp diamond. - Redhead Jokes [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 03-06-2009, 08:07 PM
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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
joystick button furiousgeorge Programming 5 02-07-2009 03:57 PM
Intelitek Loader Press PRGM Button Fail ttldomination VEX 1 02-25-2008 07:36 PM
Joystick Hat button ten3brousone Programming 8 02-20-2005 01:31 PM
Joystick Button Deference cibressus53 Electrical 3 11-01-2004 09:38 AM
Can a student Coach press the Stop Button archiver 2001 3 06-24-2002 02:39 AM


All times are GMT -5. The time now is 10:42 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi