Skip to main content

Introduction

Documentation Status Discord Build Status Code Style: Ruff

This is a library for using the I²C-based LED matrices with the HT16K33 chip. It supports both 16x8 and 8x8 matrices, as well as 7- and 14-segment displays.

  • Notes

    1. This library is intended for Adafruit CircuitPython’s API. For a library compatible with MicroPython machine API see this library.

    2. This library does not work with the Trellis 4x4 LED+Keypad board. For that product use: CircuitPython Trellis Library

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-ht16k33

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-ht16k33

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-ht16k33

Usage Example

# Import all board pins and bus interface.
import board
import busio

# Import the HT16K33 LED matrix module.
from adafruit_ht16k33 import matrix

# Create the I2C interface.
i2c = busio.I2C(board.SCL, board.SDA)

# Create the matrix class.
# This creates a 16x8 matrix:
matrix = matrix.Matrix16x8(i2c)
# Or this creates a 8x8 matrix:
#matrix = matrix.Matrix8x8(i2c)
# Or this creates a 8x8 bicolor matrix:
#matrix = matrix.Matrix8x8x2
# Finally you can optionally specify a custom I2C address of the HT16k33 like:
#matrix = matrix.Matrix16x8(i2c, address=0x70)

# Clear the matrix.
matrix.fill(0)

# Set a pixel in the origin 0,0 position.
matrix[0, 0] = 1
# Set a pixel in the middle 8, 4 position.
matrix[8, 4] = 1
# Set a pixel in the opposite 15, 7 position.
matrix[15, 7] = 1
matrix.show()

# Change the brightness
matrix.brightness = 8

# Set the blink rate
matrix.blink_rate = 2

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Metadata

Release files for adafruit-circuitpython-ht16k33 4.6.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adafruit-circuitpython-ht16k33 4.6.17
File Size Uploaded
adafruit_circuitpython_ht16k33-4.6.17.tar.gz 35.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adafruit-circuitpython-ht16k33 4.6.17
File Interpreter ABI Platform
adafruit_circuitpython_ht16k33-4.6.17-py3-none-any.whl Python 3 none any Details

Total release size: 51.9 kB

Release files / adafruit_circuitpython_ht16k33-4.6.17.tar.gz

Download URL adafruit_circuitpython_ht16k33-4.6.17.tar.gz
Size 35.6 kB
Tags Source
SHA-256 checksum
How to use checksums
753012d3f12752213577eb55e4f35c4095beb9d3da63f6d0a9d9f876129deb58
BLAKE2b-256 checksum
How to use checksums
2276d22dbcd81004526ae6b94dd11f5b463602b30bd1c045a18b71af38483079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / adafruit_circuitpython_ht16k33-4.6.17-py3-none-any.whl

Download URL adafruit_circuitpython_ht16k33-4.6.17-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c04ead88692fbe2dfd430be1ac8a116054f70153da73062cfec9f7ab0d1b9e1
BLAKE2b-256 checksum
How to use checksums
18d95d0b8ca415a1a92458f25e4d55c96e78458a9360779f79b48e963808edd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

4.6.17 This release

2 release files

4.6.16

2 release files

4.6.15

2 release files

4.6.14

2 release files

4.6.13

2 release files

4.6.12

2 release files

4.6.11

2 release files

4.6.9

2 release files

4.6.8

2 release files

4.6.7

2 release files

4.6.6

2 release files

4.6.5

2 release files

4.6.4

2 release files

4.6.3

2 release files

4.6.2

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.5

2 release files

4.5.4

2 release files

4.5.3

2 release files

4.5.2

2 release files

4.5.1

2 release files

4.5.0

1 release file

4.4.1

1 release file

4.4.0

1 release file

4.3.1

1 release file

4.3.0

1 release file

4.2.1

1 release file

4.2.0

1 release file

4.1.9

1 release file

4.1.8

1 release file

4.1.7

1 release file

4.1.6

1 release file

4.1.5

1 release file

4.1.4

1 release file

4.1.3

1 release file

4.1.2

1 release file

4.1.1

1 release file

4.1.0

1 release file

4.0.0

1 release file

3.2.3

1 release file

3.2.2

1 release file

3.2.1

1 release file

3.2.0

1 release file

3.1.0

1 release file

3.0.0

1 release file

2.9.0

1 release file

2.8.0

1 release file

2.7.0

1 release file

2.6.0

1 release file

2.5.0

1 release file

2.4.0

1 release file

2.3.1

1 release file

2.2.2

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.1.3

1 release file

2.1.2

1 release file

2.1.1

1 release file

2.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page