Micromouse is a robotics competition where tiny robots navigate a maze (14x14). These autonomous mice use ToF sensors (also Sharp IR sensors can be used) to map the maze and find the fastest route to the center, testing design, programming, and problem-solving skills.
ToF Sensors or Sharp IR sensors (low range)
LiPo 1500mAh Batteries (Capacity maybe vary)
Platform PlatformIO VS Code
Clone the repository:
git clone https://github.com/TharushaDinujaya/MicroMouse
Open Project in VS Code
cd MicroMouse
code .
Go to the Extensions view (Ctrl+Shift+X). Search for "PlatformIO IDE" and install it. Restart VS Code if prompted.
Connect each ToF sensor in to I2C line as circuit schematics given below. We've used 2 batteries. You can use any number of batteries as required. But adding more batteries means more load to the N20 Motor and Motor's lifetime may be reduced. Also you can add an accelerometer for precise measurings. Use MPU6050 or MPU6000 for this purpose. both can be use with I2C line.
The Flood Fill algorithm in a micro mouse maze-solving robot is used to explore the maze and find the shortest path to the goal. Here’s a concise description:
-
Initialization: The goal cell is set to a value of 0, and all other cells are assigned a high initial value.
-
Flooding the Maze: Starting from the goal, adjacent cells are incremented by 1, propagating outward. This creates a gradient of values representing distances to the goal.
-
Pathfinding: The robot navigates by moving to neighboring cells with decreasing values, ensuring it always heads towards the goal.
-
Exploration: As the robot encounters new cells, it updates their values and adjusts the flood fill accordingly, continuously refining its path to optimize the route to the center.
Here are some related projects