Use interrupt to get the echo

Issue #45 wontfix
Former user created an issue

Hi

I was reading through your code the other day, and I wondered if letting the library calculate the ping based on an interrupt returning would be even more accurate than simply letting the microprocessor wait for the echo? Also, it wouldn't keep the processor busy during that time. Do you think that would be possible?

Comments (2)

  1. Tim Eckel repo owner

    The problem with doing it that way is that only certain pins can be used for triggers. That would drastically reduce the functionality. Also, the polling is very quick and not really that often in microcomputer terms.

  2. Log in to comment