I/O Expander

Configure an I/O Expander device

API Features Demonstrated

Requirements and Prerequisites

This app requires a ZentriOS device, such as an AMWx06-E03 (Moray), connected via the I2C interface to a TCA6416A I/O expander.

Description

This app demonstrates control and monitoring of the I/O Expander, which adds additional Input/Output to a ZentriOS device.

The app configures an input port on the IO Expander to control the value of an output port on the I/O Expander.

If the input pin is wired to a button, and the output pin is wired to a LED, pressing the button turns the LED on, and releasing the button turns the LED off.

Usage Instructions

Open a ZentriOS serial terminal to the device. See Getting Started, Opening a ZentriOS Terminal.

Build, download and run the app. The app displays the following on the ZentriOS terminal:

> Initializing ap

Implementation

zn_app_init

configure_pins

update_led

Source

See: