Thread: limit switches
View Single Post
  #4   Spotlight this post!  
Unread 26-04-2005, 10:34
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: limit switches

Quote:
Originally Posted by stephenthe1
Hi,
We've been having a little trouble using limit switches. We get the value registered when the limit switch is pressed, but when it is released, the value doesn't change back. I figured the first thing to check would be the wiring. I haven't seen much on chiefdelphi after searching on limit switches, so if you could provide a wiring diagram, that would be helpful. Then secondly, maybe sample code for referencing the limit switch. ThankS!
-Stephen P.
A couple of questions, or answers to them, might help:
1) How are the switches connected? For example: Are they connected to the RC Digital input 1, 2, 3 etc.
2) How are you "registering them"? Do you have your own code, or are you using the interrupts associated with the digital inputs?
3) When it sticks, how do you unstick it? Manually or by reseting the controllers?

If you are using the digital inputs, my guess is that the switches are sticking, either by binding of the mechanism, or internally to the micro switch it's self. If you are using your own code to set a flag, the code may not be written to reset the flag once the switch state changes.

Good Luck, and let us know what you find.