|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Limit switches are always on.
Our team is having a difficult problem with the limit switches. While they used to work, earlier today they stopped working correctly and always returned a "true" value, regardless of whether they were pressed or not. We tries rewiring in every possible way, we tried adding the most basic limit switch code into a sample program, we tried looking online for solutions, but nothing works. Does anyone know what the problem could be?
Information Here is the source code for the sample program we tried running (comments and all): https://gist.github.com/StewEsho/68871eb0a2c541ee2b07 Here are the images of the wiring (just looking at the wire for the switch in port 1, but all switches have similar problems): http://imgur.com/a/c02fV When testing, we tried printing the outputs from all ten ports, even the ones with nothing plugged in, and they all returned "true". Shortly before this problem arose, we couldn't run the robot and the driver station said "Brownout Error". We were forced to power cycle the robot to continue use. Could this possibly be related to our issue? All other motors, speed controllers, and encoders work perfectly fine. Thank you in advance for your time and your help! |
|
#2
|
||||
|
||||
|
Re: Limit switches are always on.
Quote:
|
|
#3
|
||||
|
||||
|
Re: Limit switches are always on.
Yes, we tried using a multimeter and the switches seemed to work just fine.
|
|
#4
|
||||
|
||||
|
Re: Limit switches are always on.
The inputs pull high (true) when not connected. You need to ground the signal to make it false. The switch should be connected to the white and black.
|
|
#5
|
||||
|
||||
|
Re: Limit switches are always on.
Yes, that solved the problem. Thank you so much!
|
|
#6
|
||||
|
||||
|
Re: Limit switches are always on.
Quote:
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|