Basic GPIO Example
Demonstrates setting up IRQ callbacks to respond to GPIO inputs with GPIO outputs.
- 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, such as an AMW106 (Moray), with two buttons and two LEDs.
This is a simple app that demonstrates how to setup a GPIO interrupt to capture a button press event. Once the event is captured, a callback function is used to turn on (or off) an LED.
Two GPIOs and two LEDs are configured, with GPIO1 setup to control LED1 and GPIO2 setup to control LED2. Press Button 1, User LED 1 turns on. Press Button 2, User LED 2 turns on.
See the following links for additional information about the ZentriOS features used in this app.