HT16K33 LED driver with keyscan¶
The LEDs are controlled using the following pattern:
- turn on all connected (up to 128) LEDs one-by-one
- blink the LEDs at 2 Hz, 1 Hz, and 0.5 Hz
- reduce the brightness gradually from 100% to 0%
- 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-PCA10056 board, and connect a HT16K33 LED driver at address 0x70 on the I2C-0 bus.
# On Linux/macOS cd $ZEPHYR_BASE/samples/drivers/ht16k33 mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\drivers\ht16k33 mkdir build & cd build cmake -GNinja -DBOARD=nrf52840_pca10056 .. ninja
For flashing the application, refer to the Flashing section of the nRF52840-PCA10056 board documentation.