-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
pulseIn does not return 0 on timeout (it returns 1 or timeout value depending on pin state) #1072
Comments
Whilst you're in that file, you could remove the pinMode setting, I may have set PULLUP etc. |
I have the same problem |
@igrr the referenced PR was merged quite some time ago. Can this be closed, or is there something pending? |
@me-no-dev I just realized this is assigned to you, maybe you're the right person to ask? |
Yeah I have no clue how and when I assigned this to myself. I guess it should be closed, unless the current implementation also does not work |
Alright, closing. If there is still a problem, let's handle it in a new issue. |
In core_esp8266_wiring_pulse.c, it seems to return duration=timeout rather than duration=0 on a timeout, or, because it resets the start time after a timeout, it can also return duration=1.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: