|
Re: limit switches
I think the switch is ok. The problem is, once pressed, the value I use to reference it in the code (rc_dig_in08 == 0) when it is released, does not recognize that it is released. It recognizes in the code when it changes to one, though (rc_dig_in08 == 1) when it is pressed, but upon release, it doesn't change back to zero. Would this be code, I don't think so anyways, but I have my doubts as to whether it is hardware, because my code is such that the motor should only turn if the rc_dig_in08 == 0, and once the switch is released, and I press the button to turn the motor, it acts as if the rc_dig_in08 did indeed return back to 0, it's normal state. This really perplexes me. If you want to see my code, just respond and ask and I'll show you, it's very simple. My Mentor thinks it's possible we have a limit switch, that remembers its state, and upon release of the switch, it stays that way instead of returning back to it's 0 state. I hope this made sense, if not (I'm slightly confused myself!), I'll post the code, and will try to provide wiring details on our limit switch on Thursday. Thank you for you help!
|