Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Maze-solving algorithm/code

Status
Not open for further replies.

Robo

Junior Member level 3
Junior Member level 3
Joined
Jan 21, 2005
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
327
Hi,

I'm currently working on a maze-solving robot, and I'm using BasicStamp programming and Parallax's Board of Education as my microprocessor. Does anyone have idea on how the maze-solving code is like? Any algorithm or code is welcome.

Here is the algorithm that I'm currently using. But it does not work very well:

If (no obstacle in front)
>>keep on going forward 'now robot is going north
else if (obstacle in front)
>>turn right 90 degrees 'now robot is going east
>>if (obstacle in front)
>>>>turn left 180 degrees 'now robot is going west
run the loop again

... '>' means space here

The above code works in a primary sense. But the 90 and 180 degrees code won't work well once the robot is not going straight on the track.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top