If you need urgent consulting help click here

HT16K33 LED driver with keyscan

Overview

This sample controls the LEDs connected to a Holtek HT16K33 1 driver. The sample supports up to 128 LEDs connected to the rows/columns of the HT16K33.

The LEDs are controlled using the following pattern:

  1. turn on all connected (up to 128) LEDs one-by-one

  2. blink the LEDs at 2 Hz, 1 Hz, and 0.5 Hz

  3. reduce the brightness gradually from 100% to 0%

  4. turn off all LEDs, restore 100% brightness, and start over

The sample logs keyscan events on the console.

Building and Running

Build the application for the nRF52840 DK board, and connect a HT16K33 LED driver at address 0x70 on the I2C-0 bus.

west build -b nrf52840dk_nrf52840 samples/drivers/ht16k33

For flashing the application, refer to the Flashing section of the nRF52840 DK board documentation.