Shop OBEX P1 Docs P2 Docs Learn Events
multiple pings — Parallax Forums

multiple pings

russ christensenruss christensen Posts: 84
edited 2009-03-14 17:44 in Propeller 1
hey guys.· not too long ago i found a ping driver on the forums i think that allowed you to use up to 4? pings at the same time with the one driver.· I can't seem to find it anywhere either on obex or the forums.· does anybody remember what it is or where i can find it again?· Thanks for the help!

Russ

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-14 17:13
    I don't believe there is a PING driver for multiple PINGs, but the existing driver in the Object Exchange could be called from several cogs at the same time since there are no global variables involved. It rarely would make sense to do this since the echos from one PING could confuse the others if they were operating simultaneously. You really need to trigger only one at a time and allow a little time for the echos to die down before triggering another PING even if they're facing in completely different directions.
  • russ christensenruss christensen Posts: 84
    edited 2009-03-14 17:24
    yeah, i realized after looking at the ping.spin that parallax provides that its pointless. i don't know what i was thinking. [noparse]:)[/noparse] but i appreciate the advice on letting the echo's die down. do you know about how long i should wait?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-14 17:37
    I don't know what would be ideal for a delay, but the maximum sound round-trip time window for the PING))) is 18.5ms and I'd wait several times that, maybe 50 to 100ms.
  • russ christensenruss christensen Posts: 84
    edited 2009-03-14 17:44
    i actually had a 100ms delay in there, but i'm wondering if i'm getting weird values because of my hardwood floor. when i start moving, the ping sensor data jumps around very erratically, almost always shorter distance, which trips my halt function. any ideas?
Sign In or Register to comment.