The software for our robot was written in the Arduino language, you can take a look at our code on Github.
When designing software, our main goal was to make it as modular as possible. Modularity benefited us in two ways, it is easier to troubleshoot and it is easier to break it up into smaller test sections.
By having our code structured into small blocks, we were easily able to track where bugs occurred. This helped us minimize time spent debugging code and allowed us to spend more time testing and tuning. Secondly, it was important for us to be able to test each section of the track individually. We designed our software so that no blocks relied upon each other, and slowly built up our code base by writing and testing individual blocks before integrating them with other code. To avoid redundant and hard to read code we implemented classes and header files. This technique proved to be extremely useful in the context of the setup file. We frequently needed to update our setup code, and instead of updating every test case, we only had to modify the header file for the new code to appear in every test. |