Step 13: The Program
The more detailed function is that of shortening the path. A letter is stored at every intersection that indicates the direction the robot took. If the previous letter was a "B", indicating a wrong turn, the function that shortens the path is run to substitute letters in place of those 3 letter sequences outlined earlier.
Finally there is a function that replays the shortest path that the robot calculated when the robot is picked up and then placed back down on the black line. The robot can detect when it is placed back down and then runs the shortest calculated path.
You can view the code here or of course download it on this page.
Maze_Robot_V3.pde11 KB
Remove these ads by
Signing Up















































Visit Our Store »
Go Pro Today »




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.