Skip to content
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() pullup/down comment #538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cores/arduino/wiring_pulse.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
* before the start of the pulse. The pulseIn() function is not designed to detect
* high frequencies. The consequences of using this function to detect frequencies
* such as a 100KHz PWM signal could possibly cause a sketch to hang at the
* pulseIn() function call.
* pulseIn() function call. There is the chance a pin using pulseIn() could get
* into a floating voltage state causing the hanging issue. This should be prevented
* by using a pullup or pulldown resistor. pinMode(pin, INPUT_PULLUP) could also
* be used to keep this from happening.
*/
extern uint32_t pulseIn( uint32_t ulPin, uint32_t ulState, uint32_t ulTimeout = 1000000UL ) ;

Expand Down