Hello, I am using a Nano to detect the duration a 5vdc pump runs. On Port D4 I have a 10K resistor to Ground to pull it down.
When the pump turns on it feeds 5vdc to D4 and I need record that start, then when it turns off, calculate the seconds between and I can kind of do that.
But, I am having trouble with bounce at both turn-on and turn-off.
The Libraries I have tried (Bounce2, InputBounce etc) do not seem to be set up for when the Port is normally LOW.
I tried using a 1uF cap (Nick Gannon) but it seems to make no difference, but I may have it wired wrong.
Can anyone please suggest a Library that will handle "Duration" between LOW-HIGH-LOW states with de-bounce, or provide a pointer to some code snippets for me to try?
I'd rather use software de-bounce as the Nano is already soldered into a system and I can just solder to the top of D4 rather then add in more components.