Ping Ultrasonic Sensor
sCRYed
Posts: 2
I am kind of new to this but i need help programming my sensor. I have been been working with the Ping Ultrasonic Sensor for about a month now, and all that i have done is get it to measure distance and move. Unfortunately i can't get it to solve any mazes. I am looking for any help i could get.
Comments
en.wikipedia.org/wiki/Maze_solving_algorithm
Basically, you have to implement one of the maze solving algorithms described in the Wikipedia article and its links. All of these use trial and error, essentially recording where they've been and what they've tried so they don't repeat the same mistakes.
One of the problems using a Stamp is that it has limited storage (less than 26 bytes) for its map (of what it's tried). You may want to add some external EEPROM or SRAM or you may want to replace your BS2 with one of the other Stamp models with more storage (like the BS2p or BS2pe).
Another issue that's hard to solve is "How does the BoeBot know where it is in the maze?". There will always be some slippage as the BoeBot moves around. Eventually it may think it's in one location, but really be in the next maze position over. That causes all sorts of problems in backtracking when it reaches a dead end. Sometimes you can use existing "doors", corners, and corridors in the maze to help in backtracking through the maze.
I have created a slide show that explains line maze solving in detail. It is at:
www.richardvannoy.info/line-maze-algorithm.php
Although it talks about following a line maze drawn on the floor, the solution of a walled maze can use the same algorithm, so maybe my slide show will help.
(I just noticed I can attach it, so see attachment.)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Richard Vannoy
Programming and Electronics Instructor
www.RichardVannoy.info
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen