As mentioned on the “Jumper” page: if you hold a ribbon cable flat — no folds — and with both connectors facing you, keys pointed the same direction — there’s is a 1:1 correlation between the pins. The top-right pin on one plug links to the top-right on the other plug, and so forth. This holds true even if the cable has a doubled-over strain relief. As long as the keys point the same way and the plugs face the same way, pins are in the same positions at both ends.

Either end of the ribbon cable can be plugged into the matrix INPUT socket.

The free end of the ribbon can point toward the center of the matrix, or hang off the side…the pinout is still the same. Notice below the direction of the “key” doesn’t change.

A dual-row header gets installed on the proto shield, similar to the connector on the matrix. Just like the ribbon cable lying flat, as long as these two headers are aligned the same way, they’ll match pin-for-pin; unlike the jumper wire method from the prior page, mirroring doesn’t happen.

Wires are then soldered from the header to specific Arduino pins on the proto shield. Try to keep wire lengths reasonably short to avoid signal interference.

Using color-coded wires helps a lot! If you don’t have colored wires, that’s okay, just pay close attention where everything goes. Our goal is a proto shield something like this:

It’s not necessary to install all the buttons and lights on the proto shield if you don’t want — just the basic header pins are sufficient.

For Arduino form-factor boards, using an Adafruit proto shield: if using a shrouded socket (like on the back of the matrix — with the notch so a ribbon cable only fits one way) you’ll need to place this near the “Reset” end of the shield. The plastic shroud obscures a lot of pins. Others’ proto shields may be laid out different…look around for a good location before committing to solder.

For Arduino Mega with our corresponding proto shield: a shrouded socket fits best near the middle of the shield.

Otherwise, you can use a plain 2x8-pin male header, or two 1x8 sections installed side-by-side (as in the photo above). Since there’s no alignment key with this setup, you might want to indicate it with some tape or a permanent marker.

Depending on the make and model of proto shield, some pins are designed to connect in short rows. Others don’t. For the latter, strip a little extra insulation and bend the wire to wrap around the leg of the socket from behind, then solder.

Connect Ground Wires

32x32 and 64x32 matrices require three ground connections. 32x16 matrices have four.


Most proto shields have tons of grounding points, so you shouldn’t have trouble finding places to connect these.

Upper RGB Data

Pins R1, G1 and B1 (labeled R0, B0 and G0 on some matrices) deliver data to the top half of the display.

On the Arduino Uno and Adafruit Metro (328, M0 or M4) boards, connect these to digital pins 2, 3 and 4.

On Arduino Mega, connect to pins 24, 25 and 26.

Lower RGB Data

Pins R2, G2 and B2 (labeled R1, G1 and B1 on some matrices) deliver data to the bottom half of the display. These connect to the next three Arduino pins…

On Arduino Uno and Adafruit Metros, that’s pins 5, 6 and 7.

On Arduino Mega, pins 27, 28 and 29.

Row Select Lines

Pins A, B, C and D select which two rows of the display are currently lit. (32x16 matrices don’t have a “D” pin — it’s connected to ground instead.)


These connect to pins A0, A1, A2 and (if D pin present) A3. This is the same for both the Arduino Uno and Mega.

LAT Wire

For 32x32 and 64x32 matrices, LAT connects to Arduino pin 10.

This is the same for all boards.

The LAT (latch) signal marks the end of a row of data.

OE Wire

OE connects to Arduino pin 9. This is the same for all boards.

OE (output enable) switches the LEDs off when transitioning from one row to the next.

CLK Wire

Last one!

CLK connects to…

  • Pin 8 on Arduino Uno, Adafruit Metro 328 or Metro M0.
  • Pin A4 on Adafruit Metro M4.
  • Pin 11 on Arduino Mega.

The CLK (clock) signal marks the arrival of each bit of data.

Here’s that photo again of a completed shield. You can tell this is for a 32x16 matrix, because there are four ground connections (one of the long vertical strips is a ground bus — see the tiny jumpers there?).

The ribbon cable to the matrix would plug into this with the key facing left.

The colors and positions don’t quite match the examples above, but are close. G1 and G2 are yellow wires. LAT is the purple wire and should go to pin 10 now (we changed around some things in the Arduino library).

This guide was first published on Dec 11, 2012. It was last updated on Feb 15, 2024.

This page (Connecting Using a Proto Shield) was last updated on Mar 14, 2015.

Text editor powered by tinymce.