Shop OBEX P1 Docs P2 Docs Learn Events
Multiple PING))) triggering question — Parallax Forums

Multiple PING))) triggering question

TheGrueTheGrue Posts: 114
edited 2010-07-27 13:10 in Accessories
I have a robot with 5 PING)))'s mounted on the front. 3 face forward and two at 45 degree angles like so:

\ | | | /

My question is this, do I need to add a WAITCNT command to space the calls of each PING))) so that echos from the last one don't give false readings to the current PING))) called?

PUB SensorArray

   repeat
       PngCenter      := Ping.Inches(p_CPing)
       PngLeftAngle   := Ping.Inches(p_LAPing)
       PngRightAngle  := Ping.Inches(p_RAPing)
       PngLeftFront   := Ping.Inches(p_LPing)
       PngRightFront  := Ping.Inches(p_RPing)




More details and pictures of my robot can be found here at my robot build site

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
TOBI – The Tool Bot
letsmakerobots.com/node/7025/
RoBo Remote - Programmable Remote Controller
letsmakerobots.com/node/18692

Post Edited (TheGrue) : 7/27/2010 5:47:29 AM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-27 05:56
    Yes.

    You need to allow enough time so that the echoes from each PING can die out before the next one is triggered. Remember that the PING itself can respond to an echo up to 18.5ms from emitting a pulse of sound, but returns a response when the first echo is received (as early as 1ms from emitting a pulse of sound).
  • TheGrueTheGrue Posts: 114
    edited 2010-07-27 06:01
    Thanks Mike. I knew that I could count on you. Do know if there are any recommended delays? I have been searching for recommendations but I have not found any yet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    TOBI – The Tool Bot
    letsmakerobots.com/node/7025/
    RoBo Remote - Programmable Remote Controller
    letsmakerobots.com/node/18692
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-27 13:10
    Use common sense and physics. What's the largest space that you expect your robot to work in? Figure out the time it would take for sound to cross that space and allow 2 or 3 times that. If you don't know, use the maximum range of the PING and triple that. I'd probably round up the 18.5ms and triple it to get 60ms, maybe use 100ms, something on that order.
Sign In or Register to comment.