How to get more delay in between other task perform in pinhresult

Issue #27 resolved
bhushan12 created an issue

I want run motor when detedcted distance is less than 1m ... and want motor run for 1min

Comments (3)

  1. Tim Eckel repo owner

    Your code doesn't work because you're using the ping_timer() method which uses an event driven programming paradigm and then you try to use a delay() which is a blocking mode programming paradigm.

    As I mention in the notes for the 15 sensor sketch, you can't use delays if you'll be using the ping_timer() method. You either need to embrace an event driven programming paradigm and write your code using that method, or switch to using the ping() method and use a standard blocking mode programming paradigm.

    If none of this makes sense, it means you need to use a standard blocking mode programming paradigm. That would mean using this sketch as an example.

    I've tried to steer people away from using the 15 sketch example as most people don't understand how it works. I have tons of notes on this and even an entire wiki to help.

    Please refer to this information.

  2. Tim Eckel repo owner

    There's no issue with the library, user doesn't understand the event-driven programming paradigm required to use the ping_timer() method. Gave user instructions on using a blocking-mode programming paradigm including code examples.

  3. Log in to comment