| Alan Anderson |
18-02-2011 00:18 |
Re: Programming 2 buttons for a relay
1 Attachment(s)
Quote:
Originally Posted by LatinDrummaBoy
(Post 1025571)
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.
|