Wiring

It's easy to use AlphaNumeric Displays with Python and the Adafruit CircuitPython HT16K33 library.  This library allows you to easily write Python code to control the display.

This section will cover how to wire the AlphaNumeric Display to your Raspberry Pi. First assemble your AlphaNumeric Display.

Since there's dozens of Linux computers/boards you can use, this guide will just show wiring for Raspberry Pi. For other platforms, please visit the guide for CircuitPython on Linux to see whether your platform is supported

Connect the AlphaNumeric Display as shown below to your Raspberry Pi.

Wiring STEMMA QT Version

Here is an example of wiring the STEMMA QT version of the backpack to a Raspberry Pi using the STEMMA QT connector.

  • Pi GND to backpack GND (black wire)
  • Pi 3.3V to backpack VIO (red wire)
  • Pi SDA to backpack SDA (blue wire)
  • Pi SCL to backpack SCL (yellow wire)

Here is an example of wiring the STEMMA QT version of the backpack using a solderless breadboard. This example also includes how to wire up the VHi pin, which makes the LEDs appear brighter.

  • Pi GND to backpack GND (black wire)
  • Pi 3.3V to backpack VIO (lower red wire)
  • Pi SDA to backpack SDA (blue wire)
  • Pi SCL to backpack SCL (yellow wire)
  • Pi 5V to backpack VHi (upper red wire)

Wiring Original Version

  • Raspberry Pi 3.3V to AlphaNumeric Display I2C VIN
  • Raspberry Pi 3.3V to AlphaNumeric Display VIN
  • Raspberry Pi GND to AlphaNumeric Display GND
  • Raspberry Pi SCL to AlphaNumeric Display SCL
  • Raspberry Pi SDA to AlphaNumeric Display SDA

Setup

You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready!

Python Installation of HT16K33 Library

Once that's done, from your command line run the following command:

  • pip3 install adafruit-circuitpython-ht16k33

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

If that complains about pip3 not being installed, then run this first to install it:

  • sudo apt-get install python3-pip

Pillow Library

You also need PIL, the Python Imaging Library, to allow using text with custom fonts. There are several system libraries that PIL relies on, so installing via a package manager is the easiest way to bring in everything:

  • sudo apt-get install python3-pil

That's it. You should be ready to go.

This guide was first published on Jul 29, 2012. It was last updated on Mar 26, 2024.

This page (Python Wiring and Setup) was last updated on Mar 08, 2024.

Text editor powered by tinymce.