Switches are handled in obniz.js with
obniz.switch. Up to three of them can be connected and used.
Wiring must be done in such a way that the switch is pulled down when it is pressed.
If you have one or more switches, only the first switch will have the following special function.
|Press and hold for a few seconds at startup or immediately after startup||Enter setting mode.|
|Press and hold for more than 10 seconds at startup or immediately after startup.||Factory Reset|
|Press and hold for more than 3 seconds while in setting mode||Starts Wi-Fi setting by WPS.|
|Press while online||Sends hardware events to the cloud (e.g. program execution in the cloud).|
Press and hold at startup or immediately after startup" depends on the wired IO.
- Other than GPIO0 => turn on the power while pressing
- GPIO0 => Press and hold after startup confirmation (LED turns green, etc.)