Closed MegaMattMiller closed 3 years ago
What version of CircuitPython are you using? Please try the latest pre-release if you haven't yet.
I'm using 6.3.0
, I'll try 7.0.0-alpha.5 and report back
I think that did the trick! Distance readings are correct and it seems to be much more stable.
After running
hcsr04_simpletest.py
on a raspberry pi pico for a few seconds, the script seems to forget about it's own values. See below output:The distance value also never changes during the run, even when the Pi Pico is moved around.
sonar.distance
only returns a different value on the first sample of each run.When forcing
_USE_PULSEIO
to False, the values returned are more accurate, but only in ~15 cm steps. With that value forced to False it does not crash after a few samples.