FlowSensor-Arduino icon indicating copy to clipboard operation
FlowSensor-Arduino copied to clipboard

Bad use of INPUT_PULLUP in digitalWrite

Open amaury-herrera opened this issue 1 year ago • 0 comments

In the FlowSensor.h file, line 35 appears this line: digitalWrite(this->_pin, INPUT_PULLUP); // Optional Internal Pull-Up INPUT_PULLUP is intended to be used with pinMode function. Instead, LOW or HIGH must be used. Perhaps you want to use INPUT_PULLUP in line 34 as second argument for pinMode.

Maybe it doesn't cause any trouble, but the intention is not clear.

amaury-herrera avatar Jul 01 '24 14:07 amaury-herrera