Write a Micromouse maze-solving algorithm with Arduino.
As in, run algorithm code on a physical Arduino board, rather than your computer.
For use with mackorone/mms, a Micromouse simulator.
- Clone this repository
- Connect your Arduino board and upload the
mms-arduino.ino
sketch - Download the Micromouse simulator
- Run the simulator and click the "+" button to configure a new algorithm
- Enter the config for your algorithm (name, directory, and run command)
- Click the "Run" button
Windows:
Linux (Ubuntu):
- The Arduino board sends a message to
Main.py
Main.py
forwards that message to the simulator- The simulator sends a response back to
Main.py
Main.py
forwards that response back to the Arduino board
The Main.py
script uses
pySerial
to communicate with a running Arduino.
To install on Windows:
python.exe -m pip install pyserial
To install on Linux:
sudo python -m pip install pyserial
- You may need to download and install Arduino
- You may need to download and install Python
- Spaces in file paths are not allowed, you may need to change the default Python install path
- The
--port
argument can be found in the Arduino IDE viaTools -> Port
- The
--baud
argument needs to matchSerial.begin()
inmms-arduino.ino
- Make sure the Arduino board is connected to your computer before clicking "Run"
- After clicking "Run" it takes a few seconds for
Main.py
to establish a connection with the Arduino - Descriptions of all available API methods can be found at mackorone/mms#mouse-api
- The example code is a simple left wall following algorithm