User Manual
The first tile must be located at one of the four corners. Add either DS_TILE_TOP or DS_TILE_BOTTOM and
DS_TILE_LEFT or DS_TILE_RIGHT to indicate the position of the first tile. This is independent of the position of the first
pixel within the tiles; they can be different corners.
Tiles can be arranged in horizontal rows or vertical columns. Again this is independent of the pixel order within the
tiles. Add either DS_TILE_ROWS or DS_TILE_COLUMNS.
Finally, rows or columns of tiles may be arranged in progressive or zigzag order; that is, every row or column proceeds
in the same order, or alternating rows/columns switch direction. Add either DS_TILE_PROGRESSIVE or
DS_TILE_ZIGZAG to indicate the order. BUT…if DS_TILE_ZIGZAG order is selected, alternate lines of tiles must be
rotated 180 degrees. This is intentional and by design; it keeps the tile-to-tile wiring more consistent and simple. This
rotation is not required for DS_TILE_PROGRESSIVE.
Tiles don’t need to be square! The above is just one possible layout. The display shown at the top of this page is three
10x8 tiles assembled from DotStar strip.
Once the matrix is defined, the remainder of the project is similar to Adafruit_DotStar. Remember to use
matrix.begin() in the setup() function and matrix.show() to update the display after drawing. The setBrightness()
function is also available. The library includes a couple of example sketches for reference.
Other Layouts
For any other cases that are not uniformly tiled, you can provide your own function to remap X/Y coordinates to
DotStar strip indices. This function should accept two unsigned 16-bit arguments (pixel X, Y coordinates) and return an
unsigned 16-bit value (corresponding strip index). The simplest row-major progressive function might resemble this:
That’s a crude example. Yours might be designed for pixels arranged in a spiral (easy wiring), or a Hilbert curve.
The function is then enabled using setRemapFunction():
uint16_t myRemapFn(uint16_t x, uint16_t y) {
return WIDTH * y + x;
}
matrix.setRemapFunction(myRemapFn);
© Adafruit Industries https://learn.adafruit.com/adafruit-dotstar-leds Page 42 of 48