View Single Post
  #3   Spotlight this post!  
Unread 08-02-2009, 15:39
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
Re: Trying to control 1 motor with 2 buttons

I posted a picture of some code that will do this for you that is simpler than using a case structure. It uses some logic gates in the code and ensures that the relay is set only once during each loop execution. If you are controlling jaguars or victors than you can just change the set relay to set speed and submit constants (255, 127, or 0 or any degree thereof) to the true/false cases for the select blocks.

Here is the thread.

http://www.chiefdelphi.com/forums/sh...ad.php?t=73908

feel free to post if you have any more questions! Hope this helps!
Reply With Quote