View Single Post
  #4   Spotlight this post!  
Unread 18-02-2011, 00:18
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: Programming 2 buttons for a relay

Quote:
Originally Posted by LatinDrummaBoy View Post
Hello, Im having some issues with something similar to this. I have 2 relays connected to window motors that are controling the arm movement. They are already inverse from eachother so i dont have to invert it on the code. What im having trouble with is im using the Y-axis on the joystick to control it, and when i push it forward, it works, but if i pull it back, it wont go back.
Are you trying to connect the joystick output directly to the relay input? That's not going to work. The joystick axis provides a value that ranges from -1 to +1. The relay wants a specific enumerated value. I could explain why neutral and forward work while back does not, but that wouldn't really help you. I've attached a picture showing how I would suggest doing it.

If you aren't trying to wire a joystick to a relay with nothing between them, never mind. I'll have to see your code to give any useful advice.
Attached Thumbnails
Click image for larger version

Name:	joy2relay.jpg
Views:	22
Size:	15.2 KB
ID:	10188  
Reply With Quote