-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pulseIn()
#2538
Fix pulseIn()
#2538
Conversation
@SimonBrazell Can you give this PR a try with your sensor, see if it fixes your issues? |
@mikee47 will do! |
@SimonBrazell Any results? |
No sorry, I got busy shortly afterwards, I'll see how it goes this evening. |
Just tried to build the
|
Try |
@mikee47 any idea what might cause the 0 readings? |
50us echo timeout. Disabling interrupts would likely fix that, but more realistically applications should discard 0 reads. |
Ok, shall I merge the PR as is? |
Yes, looks like |
Very old implementation. Update to use CPU clock as timing reference.
Requires testing with real hardware.