View Single Post
  #2   Spotlight this post!  
Unread 27-01-2009, 13:29
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Please help Program Relays in WindRiver....

Are you sure you attached the proper file? I don't see anything in there mentioning the joystick buttons or relay control.

Anyway, you have not described your goal completely. Do you want the motor to run only while a button is pressed? What do you want to happen when both buttons are pressed? Do you want the button to choose the direction and start the motor, but have the motor to continue to run after you release the button, and if so, do you ever want to be able to stop the motor and how do you want to do it? What do you want the motor to be doing when the robot is enabled at the beginning of the match?

The answers to these questions will influence the appropriate program structure for implementing what you want. It will probably be as simple as a pair of if statements, or an if/elseif/else.