This repository contains the code for my micromouse (maze-solving robot) Totoro, based on the UKMARS Gemini platform (with an added MPU6050 and HC-05).
The code is broken down into separate files which contain a number of functions each:
- gemini.ino - the main Arduino code
- buttons.ino - allows use of pushbuttons
- floodfill.ino - contains maze-solving algorithm & maze driving looploop
- motion.h - drives motors a particular amount using gyroscope & encodersders
- pid.h - PID controller class
- telemetry.ino - sends telemetry in JSON to a mobile maze viewer app
- config.ino - allows configuration by Serial
- motors.ino - contains low-level motor functions
- positioning.ino - allows the robot to know where in the maze it is
- tests.ino - tests for the robot
- encoders.ino - updates the encoder counts
- leds.ino - allows the use of status LEDs
- mpu.ino - updates heading using the gyroscope
- sensors.ino - Reads the phototransistor-based wall sensors
- wallFollow.ino - simple wall following algorithm
The robot has successfully completed a 16x16 maze in the UKMARS competition 2026!