AUX GPIO count increases drastically

Hi, I have a problem that looks like several people have had problems with when I read the forum.
Has a simple circuit with a switch and uses AUX with no other MCU to report when pressed, otherwise it is in sleep.

Have tried both input and count. In my experience, count is best to use as it quickly wakes up and sends a message every time.
But the problem is that counting increases drastically every time and cannot be used for anything. Example first time 123, next time 207 and 233.

First I used count-pulldown without Resistor, then I tried with just count and own pull-down resistor of 10K, but with the same problem.

What I’m looking for is that when the button is pressed a message is sent, then the circuit can pause and ignore new presses for 3 minutes without sending a new request.
Looking at documentation gpio that you have two parameters called seconds and max, but have not been able to use these for this. Any suggestions.

I would think that count-correct is difficult to achieve since the circuit is in sleep, but a suggestion for you that should be easy to implement is as follows:
Create a new GPIO mode for example “trigger”, this is identical to how count works today.
But instead of trying to count, it just message “triggered” as soon as this is detected.
So either via the seconds or max parameter you can set that you do not want new messages until x number of seconds or minutes have passed. (trigger sleep/pause)

Saw on the forum that someone wanted to use a PIR sensor without an additional MCU, the above change can also be used for this.

Hardware:
NOTE-NBGL-500
Notecarrier A 2.0
Version 4.2.1#4015688 also tried 4.1.1#4015681

Regards,
Per-Kristian

Hi @pkl thanks for the question, and welcome to the Blues community!

I’m happy to share that we have a fix for this coming in the next developer firmware release, which is slated for this week. Stay tuned here and I’ll provide a pointer to that when it’s live.

Brandon

Hey @pkl, just to follow-up, that new feature (in firmware 5.1.1) is documented here. See the ms setting for a way to debounce button presses, for example:

{
  "req": "card.aux",
  "mode": "gpio",
  "usage": ["count"],
  "ms": 200
}

To debounce an AUX1-connected button for 200 milliseconds before registering the count.

1 Like