So, I have an autonomous, and it drives forward until it hits a limit switch. And I know that this works because I have been using for weeks. But today it started to have about a three second delay of the code noticing it was being pressed. Nothing in the code has changed about this part. I was just wondering if anybody has had any problems with limit switches going bad, or possibly wiring.
I’ve had many issues of sensors degrading in the past, though none I can recall with limit switches. should be pretty easy to try switching out your limit switch to see if it improves. if so, it was your sensor. if not, then it was something else.
Can you post your code?
I need more evidence on degrade of sensors. It’s a limit switch it’s either off or on, very little to degrade here.
I’ll put a cheeseburger bet on they have code in a Loop for time or rotations and then they check the switch.
It’s just a waitUntil(LimitSwitch.pressing);
Thanks for the code fragment, if you don’t mind, can we see all the code?