Shop OBEX P1 Docs P2 Docs Learn Events
need help with basic stamp bs2.5 — Parallax Forums

need help with basic stamp bs2.5

mady_11mady_11 Posts: 3
edited 2008-12-27 00:14 in BASIC Stamp
hi all

I'm doing a project in which i use the boe bot kit and basic stamp Bs2.5

in my project i can use one ping sensor and im required to make my robot go through a maze..explore the maze and know how to get out

the hard part is how the robot can memorize the maze and the next time when it enters the maze the robot should be able to go out directly whithout going into any wrong paths

i appreciate if any one can help me with some idea

Thank you all

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-26 19:51
    There seems to be someone else with the same project.

    What have you read so far? There are a lot of tutorials available for downloading from Parallax. Go to their main webpage, click on the Resources tab, then select Downloads, then Stamps in Class Downloads and you'll see the whole list. If you don't already have it, download the Stamp Basic Syntax and Reference Manual. From Downloads, choose Software Documentation and you'll see the Manual.

    What's a Microcontroller? is the basic introduction to the Stamp
    Robotics with the BoeBot is something you may already have. If not, download it.

    Like all Parallax products, the webstore pages have links to documentation and sample code. Check out some of the stuff with links on the PING))) page.

    There's a better search mechanism than the button at the top of the forum pages. There's a local Google search engine at Parallax that you can use by going to "search.parallax.com" and entering your search phrase.

    Read the chapters in the Stamp Basic Manual on the READ and WRITE statements. These can be used to record position information (or any other data) to unused portions of the EEPROM used for your program so the information will be there for use later.
  • mady_11mady_11 Posts: 3
    edited 2008-12-26 19:56
    i searched through google and i read some forums so my problem is not with programming....its with the logic...i know i can use look up table but i was looking for better suggestions....i can also use arrays but my problem is how can i delete from the array the unecessary paths so that in the next round my robot can go out directly whthout turining in any wrong directions on its way

    anyway thank you so much for your advice and i will go search more and read the the things you told me about hopefully i will find what i need

    thank you [noparse]:)[/noparse]
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-26 23:27
    In most maze following problems, the robot has a direction that it's facing in. It then moves in that direction for some distance or amount of time, then it turns in another direction and does the same thing again. Along the way, the robot looks for obstacles and potential paths to take. If there's more than one possible path, it has to remember which one it took last time so it won't take the same path again (if it didn't work).

    At any given decision point in the maze, it only has to remember which way to turn and how far to go. Does this help?
  • mady_11mady_11 Posts: 3
    edited 2008-12-26 23:48
    If there's more than one possible path, it has to remember which one it took last time so it won't take the same path again (if it didn't work).

    how can it remember that this path was wrong and exclude it....shoud it keep returning to the starting point whenever it reaches a wrong path??

    At any given decision point in the maze, it only has to remember which way to turn and how far to go.

    how can it remember for example that when it turned to right at a certain position it went into a dead end and avoid that the next time it enter the maze??

    my idea was to use look up table and flags(right,left,forward,reverse) and conuter so that whenever the counter reaches 4 for a certain positon then this position was totally covered .....do you have any other better sugestion than the look up table or better sugestion when using the lookup table?


    thanks alot for your reply [noparse]:)[/noparse]
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-27 00:14
    In the scheme I'm thinking of, the robot tries each of the 3 possible directions, from left to right, in turn. If it comes back from a direction, that direction has been explored and fails and it moves on to the next direction. If all 3 directions fail, the robot has to return back the last movement (step) and treat that as a failure. The robot will never repeat the same path. Note that this assumes that all paths are unique, that two paths never join later in the maze. If that's not true, then you have to carry a map of the entire maze in the robot, not just the current path. A Stamp, particularly the BS2, won't have enough storage for a large map.
Sign In or Register to comment.