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):
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!