Good code acting bad all of a sudden.

Does this happen to you? You start programming, your code is all good but after a little, with no change whatsoever it doesn’t do what it was supposed to do as good as it did before. Especially when you have a high stakes, high scoring code running at high speed, this will inevitably happen very often. And there are 3 reasons for this (and do comment if you have any more reasons to add to my list).

1- Battery that is less than perfect

In our experience, a gen 1 battery at less than 8.1 V will not do. Our teams’ batteries are pretty old too so we often can get 2-3 runs out of it before we have to charge it. With less than that, the code won’t run the same, it will make you modify your numbers which then won’t work with a good battery. So don’t touch your code till you make sure you battery is over 8.1 V. However we haven’t had the luxury of working with gen 2 batteries which claims to not lose performance over time so we’ll update this post when we get our hands on them.

2- Hot motors

When we exceed a continuous programming time of about 1hr 15 minutes or so the bot will just won’t perform the same because motors get overheated. Again our motors are 6-7 years old, don’t know if yours will do any better. But just know that there is a limit to the amount of time you can run your bot before it starts going coocoo. And again DON’T CHANGE your code till you make sure your rested bot does the same mistakes. When a driver is in charge, driver can compensate for the bot’s shortcomings but with an autonomous code your bot is all alone and if he/she doesn’t feel in tip top shape he/she will let you down!

3- Wires and debris collecting

Check if your wires have moved and now are touching your wheels. See if any VEX piece got dislocated, out of balance, out of symmetry. See if some pieces of dirt or dust have accumulated in the drive train, motors etc. These will throw off the balance of the bot and cause your perfect code to be quite imperfect. So again, DON’T CHANGE your code till you make sure you have checked for this.

One helpful tip!

One of the things you can do is have a little code to run your robot on a straight line across the field and another one to make squares around the field. Do this with a clean robot with rested motors and a good battery. Then when you’re having unexpected issues, run your “calibration” program (meaning the straight line and the square) and see how it behaves. This is to see if your lazy robot that requires a lot of rest, that can’t bother to clean itself and requires nothing and nothing BUT the perfect source of energy have any real excuses or if its your own code that needs fixing.

Yas Programmer