It's easy to use LED Matrices with CircuitPython and the Adafruit CircuitPython HT16K33 library.  This module allows you to easily write CircuitPython code to control the display.

You can use this sensor with any CircuitPython microcontroller board.

We'll cover how to wire the LED Matrix to your CircuitPython microcontroller board. First assemble your LED Matrix.

Connect the LED Matrix to your microcontroller board as shown below.

  • Microcontroller 3V to LED Matrix VIN
  • Microcontroller GND to LED Matrix GND
  • Microcontroller SCL to LED Matrix SCL
  • Microcontroller SDA to LED Matrix SDA

Library Setup

To use the LED backpack with your Adafruit CircuitPython board you'll need to install the Adafruit_CircuitPython_HT16K33 library on your board.

First make sure you are running the latest version of Adafruit CircuitPython for your board.  Next you'll need to install the necessary libraries to use the hardware--read below and carefully follow the referenced steps to find and install these libraries from Adafruit's CircuitPython library bundle.

Bundle Install

For express boards that have extra flash storage, like the Feather/Metro M0 express and Circuit Playground express, you can easily install the necessary libraries with Adafruit's CircuitPython bundle.  This is an all-in-one package that includes the necessary libraries to use the LED backpack display with CircuitPython. For details on installing the bundle, read about CircuitPython Libraries.

Remember for non-express boards like the Trinket M0, Gemma M0, and Feather/Metro M0 basic you'll need to manually install the necessary libraries from the bundle:

  • adafruit_ht16k33
  • adafruit_bus_device

If your board supports USB mass storage, like the M0-based boards, then simply drag the files to the board's file system. Note on boards without external SPI flash, like a Feather M0 or Trinket/Gemma M0, you might run into issues on Mac OSX with hidden files taking up too much space when drag and drop copying, see this page for a workaround.

Before continuing make sure your board's lib folder or root filesystem has at least the adafruit_ht16k33 and adafruit_bus_device folders/modules copied over.

This guide was first published on Jul 29, 2012. It was last updated on Feb 22, 2024.

This page (CircuitPython Wiring and Setup) was last updated on Jan 17, 2020.

Text editor powered by tinymce.