Skip to content

Write a Micromouse maze-solving algorithm with Arduino

License

Notifications You must be signed in to change notification settings

mackorone/mms-arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mms-arduino

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.

Setup

  1. Clone this repository
  2. Connect your Arduino board and upload the mms-arduino.ino sketch
  3. Download the Micromouse simulator
  4. Run the simulator and click the "+" button to configure a new algorithm
  5. Enter the config for your algorithm (name, directory, and run command)
  6. Click the "Run" button

Examples

Windows:

Linux (Ubuntu):

How it works

  1. The Arduino board sends a message to Main.py
  2. Main.py forwards that message to the simulator
  3. The simulator sends a response back to Main.py
  4. Main.py forwards that response back to the Arduino board

pySerial

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

Notes

  • 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 via Tools -> Port
  • The --baud argument needs to match Serial.begin() in mms-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

About

Write a Micromouse maze-solving algorithm with Arduino

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published