Hooking Everything Up

This guide works with all versions of Raspberry Pi except the compute modules which do not have a header. Older Raspberry Pi revisions 1 and 2 will require a 26-pin Cobbler and newer versions make use of the Cobbler Plus 40-pin GPIO connector. We provide wiring diagrams for both 40-pin and 26-pin below.

The LED backpack displays are wonderfully easy to connect to the Pi. Each module type is connected the same way. The following types are covered for wiring and example code in this guide.

  • 8x8 matrix
  • 4-character 7-segment
  • 4-character 14 segment (alphanumeric)
  • bicolor matrix
  • bicolor24 bar

Two digital pins for I2C (SDA and SCL) and two power pins (VCC and GND), as follows.

If you're using a red, yellow or green backpack, you can power the backpack from 3.3V which will keep the I2C levels at 3.3V. If you have a blue or white backpack, the LEDs will be dim if powered from 3.3V.

If you want them a little brighter, connect the VCC pin of the backpack to 5V. There are 10K pullups on the backpack to 5V. As long as the backpack is the only i2c device on the i2c bus with pullups to 5V this is perfectly safe for the Pi. If you have 2 or more 5V i2c devices, the 5V pullups may 'overpower' the Pi's strong 3.3v pullups, in this case you'll want to use a proper level shifter: https://www.adafruit.com/products/757

40-Pin (A, B, B+ and Zero) Cobbler Plus Schematic

26-Pin (Raspberry Pi Rev 1 and Rev 2) Cobbler Schematic

BeagleBone Black

Wire up the LED backpack display to the BeagleBone Black as follows (note the image below shows a matrix display, however the wiring is the same for any backpack):

  • Connect display + (power) to BeagleBone Black 3.3V or 5V power (red wire). 5V is brighter but if you have other devices on the I2C bus its better to go with 3.3V
  • Connect display - (ground) to BeagleBone Black ground (black wire).
  • Connect display D (data/SDA) to BeagleBone Black I2C2_SDA pin P9_20 (orange wire).
  • Connect display C (clock/SCL) to BeagleBone Black I2C2_SCL pin P9_19 (purple wire).
  • If there's a Vi2c or IO pin, connect that to 3.3V as well

Note that the BeagleBone Black has two I2C interfaces and this wiring will use the/dev/i2c-1 interface. Make sure there aren't any device tree overlays loaded which use these I2C pins for other purposes. The default BeagleBone Black device tree configuration with no overlays loaded will expose the necessary I2C interface for the wiring above.

This guide was first published on Aug 24, 2012. It was last updated on 2019-09-07 14:28:39 -0400. This page (Hooking Everything Up) was last updated on Sep 12, 2019.