zephyr/samples/drivers/ht16k33
Fabio Baltieri 06236ba883 drivers: ht16k33: convert from kscan to input
Convert the ht16k33 to use the input subsystem. This can still be used
with the kscan API with the zephyr,kscan-input driver, or use the
input-keymap one to generate input codes instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-06 14:53:36 +01:00
..
boards drivers: ht16k33: convert from kscan to input 2024-05-06 14:53:36 +01:00
src drivers: ht16k33: convert from kscan to input 2024-05-06 14:53:36 +01:00
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
prj.conf drivers: ht16k33: convert from kscan to input 2024-05-06 14:53:36 +01:00
README.rst asamples: drivers: ht16k33: fix product link 2024-03-15 18:21:05 -04:00
sample.yaml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00

.. zephyr:code-sample:: ht16k33
   :name: HT16K33 LED driver with keyscan
   :relevant-api: led_interface kscan_interface

   Control up to 128 LEDs connected to an HT16K33 LED driver and log keyscan events.

Overview
********

This sample controls the LEDs connected to a `Holtek HT16K33`_
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 :ref:`nrf52840dk_nrf52840` board, and
connect an HT16K33 LED driver at address 0x70 on the I2C-0 bus.

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/ht16k33
   :board: nrf52840dk/nrf52840
   :goals: build
   :compact:

For flashing the application, refer to the Flashing section of the
:ref:`nrf52840dk_nrf52840` board documentation.

References
**********

.. target-notes::

.. _Holtek HT16K33: https://www.holtek.com/page/vg/HT16K33A