This month was spent finalizing the Micromouse’s obstacle avoidance. I chose to write my own program from scratch so that I could have a deeper understanding of how the system works. A benefit of this is that I find it easier to debug a program when I know how every system of it works.

I decided to structure the program in an object-oriented way, as opposed to the procedural structure used by the sample program. Object-oriented programming reduces repetitive code by defining specific “objects” that each have “attributes” and “functions”. For example, my program features a “motor” class that handles all the logic required to setup the pins and has functions to control the target speed, as well as its own child class “PID controller” that handles all the PID logic, and returns the output value to the parent motor class.

The final thing we did was fabricate and attach the touchbar, demonstrate the fully functional obstacle avoidance, and then begun planning for our next step: white line avoidance.

Categories:

Tags:

Comments are closed