Software

As with any large project, you want to break the MicroMouse software down into manageable pieces.

  • Start by making the wheels spin under software control. Notice that to make the robot move forward, one wheel will have to spin clockwise while the other will have to spin counterclockwise. Put it down on the floor and watch with satisfaction as the mouse moves across the room.
  • Once you get it to move, put it in the maze and make it move straight while using the sensors to correct its heading. This is the most basic of the movement routines and getting it right will result in a reliable mouse.
  • Next, try to make the mouse move straight through a specific number of cells and come to a stop. Whether it needs to move one cell or fifteen cells, it needs to be accurate. Here’s a trick that will help:

If your mouse has the wing type sensors and it sees an adjacent wall, it knows that it is passing a cell boundary and it can recalculate its odometry reading. You can do the same thing when the sensors detect an opening along the wall it is following.

  • Finally, have the mouse produce smooth left and right turns. Unlike going straight making turns is usually done “blind”, without the aid of the sensors. This is what caused us the most problems for us and it is where we spent most of our time. If your mouse can make clean turns consistently, you will have a very reliable robot.

When your mouse can move about the maze reliably, it must then be able to solve the maze. There are several popular algorithms for doing this.

 

Summary:

When it comes time to program the mouse, stick to a programming language that you know. Writing a MicroMouse program is tough enough without learning the syntax of a new language. Also, break down the large task of writing the MicroMouse program into smaller, managable pieces. Start with the movement and mapping routines and then move onto maze solving.