Autonomous quits at random times

Hi, I can’t find the source code to check if there’s a bug.

Yes we have a fresh 9 volt battery in.

We suspected this as well, so we switched out the entire cortex…no dice.

I removed the code because I believe we may have discovered the problem and the team didn’t want their code floating out there a week before our state competition.

When I disconnect the IME’s from the I2C port the robot will no longer drop connection during driver control. It appears a static charge may have been getting built up in the IME’s and discharging causing the cortex to momentarily reset. We have not been able to test our autonomous yet because it was dependent on the IME’s. Shortly, we will switch the IME’s for quad encoders to verify that was the problem. (we are from Minnesota and the winter air is incredibly dry and static charges build up very quickly on the robot…almost every time you touch the robot you get a shock)

Thanks to @jpearman for leading us down the static route…hopefully that was the problem and using quad encoders will negate the issue.

I don’t know if anyone has said this but your LCD screen can cause problems take the code out for the screen see what happens I think is has something to do with the brain can’t keep updating the screen while doing other stuff

No. That’s not true. Driving the LCD does not consume much time or computation. So, no.

It’s entirely possible for a poorly constructed loop to hog the CPU, but that will happen without regard to LCD communications.

I had a problem with the lcd my teammate told me to comment out the lcd (it was displaying my 2 pots) and that stopped my problem of either the auto studdering or stopping completely

To follow up: Our problem was 100% the integrated motor encoders. They were being reset due to the static on our field which was actually causing our cortex to reset as well. We replaced the IME’s with quad encoders and we had zero problems after that.

Lesson: Never use IME’s if static buildup may be a problem in your climate.