Step 1: The Theory Part 1
There are basically 2 steps. The first is to drive through the maze and find the end of it. The second is to optimize that path so your robot can travel back through the maze, but do it perfectly with out going down any dead ends.
How does the robot find the end of the maze?
I use a technique called the left hand on the wall. Imagine you are in a maze and you keep your left hand on a the edge of the wall at all times. Doing this would eventually get you out of a non-looping maze. This instructable will only deal with mazes that do not loop back on themselves.
This left hand on wall algorithm can be simplified into these simple conditions:
- If you can turn left then go ahead and turn left,
- else if you can continue driving straight then drive straight,
- else if you can turn right then turn right.
- If you are at a dead end then turn around.
The robot has to make these decisions when at an intersection. An intersection is any point on the maze where you have the opportunity to turn. If the robot comes across an opportunity to turn and does not turn then this is consider going straight. Each move taken at an intersection or when turning around has to be stored.
L = left turn
R= right turn
S= going straight past a turn
B= turning around
So let us apply this method to a simple maze and see if you can follow it. View the photos to see this method in action.
The red circle will be the robot.
As you can see in the photos for this example, the final path is LBLLBSR.

































Remove these ads by
















Visit Our Store »
Go Pro Today »




and could you plz tell more specifically how to make the motor controller?
plz help me.!
The same code will work on an Arduino Uno.
(an image of my board is attached)
1. What happens when you plug it in? Should some kind of software or something pop up? Does it need to be a mac or windows or can in be both?
2. does the arduino need power when it is connected for the program to be put on it?
3. Is there alternate software I need to read this code or put it on the arduino?
2. The programming cable supplies power for you.
3. You need to install the Arduino IDE (http://arduino.cc/en/Main/Software) to view the code, edit it, and upload it.
As for Dorkbot, you have to send him the files and he normally responses in a day or two.
If yes then can u explain PIN Diagram.
Here is one: http://www.sparkfun.com/products/9718
and could you tell me how to connect this motor driver to the arduino (the same way you told in step 8)and about the DC motor..
plz reply soon, i want to do this robot very soon..
thank you
Do not use a regular DC motor. Use a 5-6V gear motor.
can i use regular DC motors? (http://www.rhydolabz.com/index.php?main_page=product_info&cPath=121&products_id=815)
and can i use a motor driver (http://www.rhydolabz.com/index.php?main_page=product_info&cPath=108&products_id=858)
if yes, could you please guide me through the process, it would be of great help.
thanks
Though i personally liked it better to make my own PIC based board instead of the too easy arduino solution.