In schematic form, here’s what the circuit will look like:

Some LED strips change the sequence of the four wires. Always refer to the labels on the LED strip for the pin functions, don’t just blindly follow the order shown here…yours might come from a different batch.

For the momentary switch buttons, connect one leg of each to GND, then connect the other leg to A3, A4 and A5 respectively.

Dotstar Wiring will be the same as your test strip:

  • Dotstar Clock --> Feather #13
  • Dotstar Data --> Feather #11
  • Dotstar G --> Battery GND
  • Dotstar + --> Battery +

A little later (on the “Matrix Build” page) the rubber sleeve will be removed from the Dotstar strip and we’ll cut it into sections to create a two-dimensional matrix.

My Dotstars are wired in a “progressive” layout, rather than a “serpentine” layout, since that worked better in my design. 

The code defaults to serpentine layout, so if you wire your LEDs in a serpentine fashion you don't need to make any changes to the code.

If you use a progressive layout, like me, look in the Processing OPCvideo script and find this section of code:

Download: file
// Set up OPC pixel grid.  Arguments are: 1st pixel index,
  // row length, # of rows, center x, y, horizontal & vertical
  // pixel spacing, angle (radians), 'zigzag' flag (true/false):
  opc.ledGrid(0, arrayWidth, arrayHeight, (width - 1) / 2,
    (height - 1) / 2, scale, scale, 0, true);

For a serpentine layout, leave this code alone.  For a progressive layout, change the last parameter to "false".

If you find your video comes out "flipped" backwards on your matrix, add a "-" before the first scale parameter to flip it back:

Download: file
// Set up OPC pixel grid.  Arguments are: 1st pixel index,
  // row length, # of rows, center x, y, horizontal & vertical
  // pixel spacing, angle (radians), 'zigzag' flag (true/false):
  opc.ledGrid(0, arrayWidth, arrayHeight, (width - 1) / 2,
    (height - 1) / 2, -scale, scale, 0, false);
This guide was first published on Jun 05, 2016. It was last updated on Jun 05, 2016. This page (Wiring) was last updated on Jun 25, 2019.