Shop OBEX P1 Docs P2 Docs Learn Events
Pings per Scan Quesiton — Parallax Forums

Pings per Scan Quesiton

Bill ChennaultBill Chennault Posts: 1,198
edited 2010-01-08 19:57 in BASIC Stamp
All--

I am working with Ping and the Parrallax Standard Servo. I would like for the servo to turn 90* left and right, continuously. How many pings should I generate per left or right scan?

I am thinking that the optimum value depends on the distance. Since I only care about anything within three feet, I GUESS that determines the optimal number of pings I should produce. ("Optimal" is such a precise word. All I want to do is reduce processor overhead to some common sense level.)

Thanks!

--Bill

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-08 18:09
    I don't know how much time it takes for the servo to pan from left to right. Given that you should produce servo pulses about every 20ms, you could just see how you've got your loops set up and how many steps you have. The PING))) has a maximum echo time of just under 20ms. I would allow 2 to 3 times this to allow ambient echoes to die out. That's one PING about every 50-60ms and you'd need 3 servo pulses for each position (to hold the servo in position). You can figure out the rest.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2010-01-08 19:57
    Mike--

    That is invaluable information for me! I think it will go a long way to solving not only the issue I mentioned, but some obvious timing problems I am having in the SX environment when using PING)) and the servo and an LCD.

    Thank you very much.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
Sign In or Register to comment.