[99, 99, 99, 99, 99, 42, 99, 50, 86, 90, 62, 98, 70, 42, 78, 82, 54, 90, 30, 66] during
[99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99] after
[99, 61, 65, 37, 73, 45, 49, 53, 89, 93, 65, 37, 73, 45, 49, 85, 57, 61, 33, 37] during
[99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99] after
[99, 25, 61, 97, 37, 73, 77, 49, 85, 89, 29, 97, 69, 41, 77, 49, 85, 57, 93, 65] during
[99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99] after
Doing some things while PulseIn is measuring degrades the accuracy. The above shows a particularly bad example. I'm unsure if there is a bug here, or whether this is just a case of "if you want microsecond accuracy, you'll have to be gentle with it". But if the latter, this would be a documentation request for "how do you know what to avoid?"
It's puzzling that the durations are always on the short side. That suggests a delay is getting inserted between checking the current pulse duration and starting the timer for the next one, which doesn't seem like it should happen.
Firmware
Code/REPL
Behavior
Description
Doing some things while PulseIn is measuring degrades the accuracy. The above shows a particularly bad example. I'm unsure if there is a bug here, or whether this is just a case of "if you want microsecond accuracy, you'll have to be gentle with it". But if the latter, this would be a documentation request for "how do you know what to avoid?"
It's puzzling that the durations are always on the short side. That suggests a delay is getting inserted between checking the current pulse duration and starting the timer for the next one, which doesn't seem like it should happen.