|
Re: Programming 2 buttons for a relay
I suspect the code is doing what you told it, just not what you wanted. If you right click, you can set a breakpoint on the relay function inside the case for button two. Then you will know for sure that the button is setting the relay off.
The next question is, what does turning off the relay really do on your robot.?Is that the right thing to do? Changing the constant to other values may be the right thing. Be safe, especially if this is controlling pneumatics.
Greg McKaskle
|