builtin_button - wolfen351/public-micropython-iot-platform GitHub Wiki
The builtin_button
module is designed to expose the functionality in the built in button on many of these development boards like the S2 Mini. It sends the fact that the button is pressed as telemetry.
Currently, the status of the built in button is not displayed on the UI.
The hardware is usually already soldered to the main board. This is designed to allow the user to assign a function to the button. The pinout is board specific, and can be found in the documentation for the board.
This module is configured by setting the builtinButton
key in the profile.json
file. The value of this key is a dictionary with the following keys:
"builtinButton": {
"pin": 0
},
The pin
key is the GPIO pin that the button is connected to.
Image from the S2 Mini:
S2 Mini documentation: https://www.wemos.cc/en/latest/s2/s2_mini.html
The main point of this module is to provide telemetry showing the current state of the button. It provides this as telemetry on each cycle.
def getTelemetry(self):
return { 'button/onboard': self.value }
This module consumes no telemetry from other modules.
This module does not provide any commands to other modules. It only provides telemetry about the button state.
This module does not consume any commands from other modules.