Blinky Example
Demonstrates using a periodic event to toggle LEDs.
- SDK directory:
apps/basic/blinky
- Zentri App Store:
ZENTRI-BABLINKY
API Features Demonstrated
Platforms
This app works on:
- AMW004 - Zentri Mackerel evaluation board
- AMW106 - Zentri Moray evaluation board
- Other boards with two platform user LEDs.
Requirements and Prerequisites
Requires a ZentriOS evaluation board.
Description
When the Zap is compiled and run, the two platform user LEDs blink alternately.
Implementation
zn_gpio_init
The app initializes the two platform GPIOs.
zn_event_register_periodic registers blink_event_handler
to run every 500ms.
blink_event_handler
Uses zn_gpio_set to toggle one LED on and the other off.
Source Code
See: