[SOLVED] Puck.js Puck.capSense() function seems to hang #3848
Replies: 1 comment
-
Posted at 2021-08-31 by @yerpj I slightly misunderstood the root cause. Given that my probe is made out of 2 pads, one for Now I will try 2 things:
Posted at 2021-08-31 by @yerpj Well it appears that method Posted at 2021-08-31 by @gfwilliams Glad you got it sorted! As you noted, the capacitance test expects the thing you're measuring not to have any resistance to GND, and when that happened the function gets stuck waiting for the voltage to rise (since there's only a 1MOhm pullup resistor I think) If you do want to use resistance I believe I've had some luck with plant moisture by adding a pullup to an ADC pin and then measuring the voltage |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-08-30 by @yerpj
Hi guys,
I am using pin D11 and
Puck.capSense()
feature to detect water leakage. The wire on D11 has a bigger capacitance if put into water.When the wire is "dry" everything is fine, but when I try into water, capSense() takes a lot more time to return (about 1 second) and returns value 20000200. If I remove the wire from the water and dry it out, capSense() remains in a state that takes 1 second to return, with value 20000200.
After that if I run
Puck.selfTest()
it returnsCapsense resistor disconnected? (pullup)
a few times but after a while it seems to put the function back into a normal mode. This process is repeatable.Any hint?
Beta Was this translation helpful? Give feedback.
All reactions