Hi Yuriy,
I sent you some captures via email (yuriy at touchdro dot com)
Let me know what you think.
-- Louis
Louis,
I looked at your captures, and they don't look right. When the probe is in "off" state (regardless of whether it's NO or NC) you should be not getting "p1". Most firmware will send only about 10 "p0" data points and then stops sending probe data until it's triggered again. When the probe is triggered, the firmware will send "p1" for as long as the probe is triggered, then a few "p0" and stop sending probe data again. The "Inverted" switch in the app is not a good workaround in this case. There are important timing implications, so having this backwards will cause all sorts of issues.
Most importantly, off-to-on transition has the highest priority. When the probe triggers, the firmware grabs the counter values within 2-4 microseconds; during on-to-off transition it doesn't, so the delay can be 40 milliseconds in the worst case scenario (4 factors of magnitude slower), which will destroy any hope for probe accuracy or repeatability.
Second, when the probe is off and is "spamming" the app with "p1" data, which takes extra processing (drains the batter faster on the tablet), etc.
The expected behavior for any ESP32-based TouchDRO adapter should be:
when the probe is not triggered (regardless of NC or NO), you should see a few "p0"s in the data stream
when the probe is triggered, you should see "p1" until the moment when the probe returns to the default state.
A few other things:
On most TouchDRO adapters probe input is pulled up to 5V via a weak pull-up resistor. If the probe you are using behaves as a basic switch, it should be connected between the signal pin and the ground. Vcc is only used for "fancier" probes that have internal circuit, etc.
In most cases, build-in LEDs can cause issues, but Drewtronics probes (at least the three that I touched) seem to work OK with the LED. May be I just go lucky and the combination of tolerances on the Schmitt trigger IC on my board and the voltage drop on the LED just worked somehow.
With every TouchDRO adapter that I ever sold/made, the stuff should be plugged in before the adapter is powered up. The firmware does all sorts of checks and self-configuration during boot. This is VERY important.
Regards
Yuriy