Hello, all. I’ve successfully wired in a momentary push-button switch between my RAK 19700 base’s AIN1 and GND. Specified the user button as pin 31 in the device config and now I’ve got a nice little user-button.
The whole process is detailed here:
First off, it works! I can successfully drop into super-deep-sleep mode with a long press on the button. It wakes up again with a simple click of the same button.
A double-click of the same button will also cause the node to initiate an ad-hoc nodeinfo ping.
I couldn’t “see” any evidence of the ping, but hooking up to serial and watching the debug logs shows me that it is acknowledging and responding to the double-click as well…sometimes.
I think it’s got to do with the timming of what Meshtastic determines to be a “double click” versus two closely spaced single-clicks.
At present, it seems I’m only about 50/50 as to whether I get two single clicks back-to-back, or a single double-click.
Is there any way to adjust what the system considers a “double click” from the stand point of timming? It seems if that detection threshold were a little looser, it would “see” the second single click as a double click more consistently.
Also, I’ve noticed if you’ve double clicked a second time within a certain time threshold, the debug shows it reading the double click but opting not to send the ping out if it’s been too soon since the last time. That’s fine, I understand why that’s a feature, but does anyone know what that maximum time between pings is? I don’t want to spam the mesh, but it’s a helpful tool “in the field” for range tests and the like.
I know I could review the source code, and I may end up doing just that, but wanted to put the question out there…and let everyone know you do NOT need an add-on board to obtain a user-button on a RAK19700!
Best to all!