Shop OBEX P1 Docs P2 Docs Learn Events
ping sensor and bracket kit help — Parallax Forums

ping sensor and bracket kit help

brownaus14brownaus14 Posts: 2
edited 2014-04-07 11:31 in Accessories
http://www.parallax.com/downloads/roaming-ping-simple-basic-stamp-code


I used this program but it doesn't work for the maze it identified the walls to quickly what would I have to do to make identify the walls at a closer distance and not as far away so it can navigate the maze with ease

Comments

  • Steph LindsaySteph Lindsay Posts: 767
    edited 2014-04-07 11:01
    Hi brownaus14,

    In the example program you pointed out, take a look at the GetSonar subroutine. The first IF statement has the condition "IF (rawDist < 600) THEN." It translates to "IF the raw distance value measured by the PING sensor is less than 600, then..."

    So, the value 600 in this statement controls the distance at which the robot identifies a wall. Try experimenting with different values in place of 600 to see if it gets you the result you want. You may find that you need to adjust the maneuvers too.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-04-07 11:31
    Also note that this code was not intended for navigating a maze directly. It is intended for open roaming. The code would have to be rewritten for such a purpose.
Sign In or Register to comment.