Basic Button Example
Demonstrates using the ZentriOS button library to handle GPIO input.
- SDK directory:
- Zentri App Store:
API Features Demonstrated
This app works on:
- AMW004 - Zentri Mackerel evaluation board
- AMW106 - Zentri Moray evaluation board. See Using AMW106 Button 1 with the ZentriOS SDK.
Requirements and Prerequisites
Requires a ZentriOS evaluation board.
When a button on the evaluation board is pressed or released, the app writes a message to the ZentriOS log bus indicating which button was touched and what action took place.
During app initialization, the app sets up button configuration which includes handlers for button events.
The calls to button_init apply the configuration to each button.
Each handler sends a message appropriate to the action that invoked the handler.