Software Design

Modular Programming

The code for our robot was written in the Arduino IDE. We had one source file which made function calls to various C header files. These header files contained function declarations and definitions, as well as constants used throughout the program.


Our code repository is hosted on Github. Using git simplified the process of collaboration by allowing us both to work simultaneously on separate files or functions without fear of overwriting each other's progress.

State Diagram

PID Control

To navigate the competition surface Veronica followed black tape with information from two reflectance sensors (QRD1114) mounted underneath the chassis by utilizing PID (Proportional Integral Derivative) control. The tape following code used a PID algorithm to determine and implement motor corrections which kept Veronica driving directly over the tape. Tuning was done experimentally. The final algorithm can be found in the tape.h file located in our github repository.

Veronica tape following by PID control