To talk to the LED helper chip you'll need to use our Arduino Adafruit LED Backpack library from github.

To download you can visit the repository, or simply click on this button:

Rename the uncompressed folder Adafruit_LEDBackpack. Check that the Adafruit_LEDBackpack folder contains Adafruit_LEDBackpack.cpp and Adafruit_LEDBackpack.h Place the Adafruit_LEDBackpack library folder your arduinosketchfolder/libraries/ folder.

You may need to create the libraries subfolder if it's your first library. We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use

Rename the uncompressed folder Adafruit_GFX and check that the Adafruit_GFX folder contains Adafruit_GFX.cpp and Adafruit_GFX.h

Place the Adafruit_GFX library folder your arduinosketchfolder/libraries/ folder like you did with the LED Backpack library

If using an older version of the Arduino IDE (pre-1.8.10), also locate and install the Adafruit_BusIO library (newer versions do this automatically when using the Arduino Library Manager).

Adafruit_GFX isn’t actually used for the segmented display, it's only for the matrix backpacks but it's still required by the library so please install it to avoid errors! Restart the IDE.

Run Test!

Once you've restarted you should be able to select the File->Examples->Adafruit_LEDBackpack->quadalphanum example sketch. Upload it to your Feather as usual. You should see a basic test program that goes through a bunch of different routines.

Upload to your Arduino, and open up the Serial console at 9600 baud speed. You'll see each digit light up all the segments, then the display will scroll through the 'font table' showing every character that it knows how to display. Finally, you'll get a notice to start typing into the serial console. Type a message and hit return, you'll see it scroll onto the display!

Library Reference

For the quad displays, we have a special object that can handle ascii data for easy printing.

You can create the object with

Download: file
Adafruit_AlphaNum4 alpha4 = Adafruit_AlphaNum4();

There's no arguments or pins because the backpacks use the fixed I2C pins.
By default, the address is 0x70, but you can pass in the I2C address used when you initialize the display with begin

Download: file
alpha4.begin(0x70);  // pass in the address

Next up, the segments can be turned on/off for each digit by writing the 'raw' bitmap you want, for example, all the LEDs off on digit #3 is

Download: file
alpha4.writeDigitRaw(3, 0x0);

All the segments on for digit #0 is

Download: file
alpha4.writeDigitRaw(0, 0x3FFF);

This is the segment map:

the 16 bit digit you pass in for raw image has this mapping:

0 DP N M L K J H G2 G1 F E D C B A

The first bit isn't used, you can make it 0 or 1

To turn on just the A segment, use 0x0001
To turn on just the G1 segment, use 0x0040

ASCII data

If you're just looking to print 'text' you can use our font table, just pass in an ASCII character!

For example, to set digit #0 to A call:

Download: file
alpha4.writeDigitAscii(0, 'A')

Writing Data

Don't forget to 'write' the data to the display with

Download: file
alpha4.writeDisplay();

That's what actually 'sets' the data onto the LEDs!

This guide was first published on May 04, 2016. It was last updated on May 04, 2016.

This page (Usage) was last updated on Nov 07, 2020.