DotStar Matrices

We also sell these lovely DotStars in MATRIX form! This gives you a grid of LEDs for 2D blinkin-fun.

You can easily turn a flexible DotStar matrix into your very own glowing canvas by using the Adafruit DotStarMatrix library.

We have the flexible matrices in multiple size:

To get going, install the Adafruit DotStarMatrix library

You can download a zip of the latest DotStarMatrix library by clicking below

Unzip and rename the resulting folder “Adafruit_DotStarMatrix”, making sure it contains Adafruit_DotStarMatrix.cpp. Move that folder to your ArduinoSketchBook/Libraries folder and restart the Arduino IDE. Library installation is a frequent stumbling block…if you need assistance, our All About Arduino Libraries guide spells it out in detail!

You'll also need the Adafruit_GFX library, if you dont have it already, download it from here. Or by clicking below for the zip

Once you have both libraries, restart the IDE and open up the File->Examples->Adafruit_DotStarMatrix->matrixtest example, and adjust the data/clock lines to what you're planning on using

#define DATAPIN  4
#define CLOCKPIN 5

Then, depending on your matrix size & style, you'll have to also adjust this line:

Adafruit_DotStarMatrix matrix = Adafruit_DotStarMatrix(

The first four numbers are easiest to set, the first 2 are the size of the matrix, just put in 8, 8 or 16, 16 or whatever. The Data and Clock pins are also set.

The argument to the object is a bunch of 'flags' letting it know which way the matrix goes. You will likely have to mess with these a little depending on how your matrix is set up.

Chances are you want to use:

  • DS_MATRIX_PROGRESSIVE for purchased flexible matrices, rather than DS_MATRIX_ZIGZAG which is often used for DIY matrices
  • DOTSTAR_BGR for almost all matrices, Dotstars had a 'color swap' but that was in late 2014 so try this one first

Then switch around DS_MATRIX_TOP/DS_MATRIX_BOTTOM, DS_MATRIX_RIGHT/DS_MATRIX_LEFT and DS_MATRIX_ROWS/DS_MATRIX_COLUMNS until you get the orientation and pixel direction you want.

Last updated on Oct 24, 2015 Published on Dec 24, 2014