Using Setup Button as normal button [SOLVED]


I am creating a project using the P1 on a custom board and was wondering whether it was possible to use the setup button for two functionalities:

  • When not connected to Wi-Fi, as the default setup button functionalities
  • When connected to Wi-Fi, a short press needs to be detected by the custom firmware

If this is possible, what is the best way of going about this?


Yes there are options to do that.

For one, the Setup Button pin is refered to via BTN and you can use the System.on() function to get informed about button presses

Thanks, this is good to know.

How can you tell the device to ignore the button as a setup button when connected? Or does a single press of the setup button while connected not do anything?

Why not just try it? :wink:
But: Nope, a single tap doesn’t do anything.

Amazing, thanks so much! Works perfectly.

1 Like