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 returns Capsense 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?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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?