Hi Yuriy, No worries, the many outweighing the one...or something like that
My probe interface starts at +9.1v (had it available as the regulated input voltage for the battery charging controller) through an E-103 10mA current regulating (limiting) diode, a several hundred ohm current sense resistor then through the probe to ground. A window comparator using a dual comparator with open-collector outputs "looks" across the sense resistor to differentiate probe current between three levels:
probe no-touch - contacts closed (current is 10ma limited by diode - above window): TouchDRO probe input = ground
probe touch - contacts open, LED active (LED current inside the "window"): TouchDRO probe input = open
probe disconnected (no current - below window): TouchDRO probe input = ground.
It's been a while but I vaguely remember the 10mA probe current came from discussion with Andrew as a good tradeoff between contact cleaning and contact wear.
I think the LED current ends up around 650uA. The "UPS" battery powers only the module and the scales and not the probe or tach so the 10mA/~91mW probe current/power isn't an issue for battery hold-up time.
-------------------------
Baffling indeed... I did another experiment and the spam isn't spam, it's just reacting on the wrong edge (or level) but maybe you already figured that.
In the snippet below the board is powered up with the input grounded (using a switch) then the serial terminal is connected and the p channel is quiet. When the input goes high nothing changes. When the input is taken low again it outputs p1s until the output is taken high then outputs a few p0s and goes quiet. Repeated it several times in the snippet below.
Looks very similar to the normally open case. Can't tell the difference between actions due to edges or levels but the the code snippet you posted above seems pretty straightforward.
12:44:29.867 Connecting to TouchDRO ...
12:44:32.212 Connected
12:44:32.234 x0;y0;z0;w0;p1;t0;x0;y0;z0;w0;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;x0;y0;z0;w0;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;x0;y0;z0;w0;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;p1;x0;y0;z0;w0;p1;p1;p1;p1;p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