How to read the MODE button

Is there a function to read the Electon’s MODE button, and use it as a user button?

In ASSET TRACKER RK, I stumbled on buttonHandler within 2_GPSCellularOnOff.ino
and was wondering what it was.

…Yep, just read that’s exactly what buttonHandler does:
From ASSET TRACKER RK Github’s README:
"…Pressing the MODE button toggles the cellular connection."

Yes, that’s what the button handler does.

https://docs.particle.io/reference/firmware/electron/#system-events

Note: On the Electron you can’t use double click on the MODE button because that puts it to sleep and you can’t override that. But single click works great.

1 Like

Hi Rikkas sorry to revive an old thread

Where is this (double Click) documented?

What sort of sleep mode does it put the Electron into, how long does it stay in sleep?

Also for the button pressed event, where is the time limit before it goes into listening mode documented.

What other functions are hanging on the button that we may need to know about? it is hard to use it when you don't know all this stuff, or where it is documented.