Modifications

Sauter à la navigation Sauter à la recherche
2 360 octets ajoutés ,  2 mars 2014 à 16:30
Ligne 68 : Ligne 68 :  
== Tiled Matrices ==
 
== Tiled Matrices ==
 
A ''tiled'' matrix is comprised of multiple smaller NeoPixel matrices. This is sometimes easier for assembly or for distributing power. All of the sub-matrices need to be the same size, and must be ordered in a predictable manner. The Adafruit_NeoMatrix() constructor then receives some additional arguments:
 
A ''tiled'' matrix is comprised of multiple smaller NeoPixel matrices. This is sometimes easier for assembly or for distributing power. All of the sub-matrices need to be the same size, and must be ordered in a predictable manner. The Adafruit_NeoMatrix() constructor then receives some additional arguments:
 +
 +
<nowiki>Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(
 +
  matrixWidth, matrixHeight, tilesX, tilesY, pin, matrixType, ledType);</nowiki>
 +
 +
The first two arguments are the width and height, in pixels, of {{underline|each}} tiled {{underline|sub-matrix}}, {{underline|not}} the entire display.
 +
 +
The next two arguments are the number of tiles, in the horizontal and vertical direction. The dimensions of the overall display then will always be a multiple of the sub-matrix dimensions.
 +
 +
The fifth argument is the pin number, same as before and as with the NeoPixel library. The last argument also follows prior behaviors, and in most cases can be left off.
 +
 +
The second-to-last argument though…this gets complicated…
 +
 +
With a single matrix, there was a starting corner, a major axis (rows or columns) and a line sequence (progressive or zigzag). This is now doubled — similar information is needed both for the pixel order within the individual tiles, {{underline|and}} the overall arrangement of tiles in the display. As before, we add up a list of symbols to produce a single argument describing the display format.
 +
 +
The NEO_MATRIX_* symbols work the same as in the prior single-matrix case, and now refer to the individual sub-matrices within the overall display. All tiles must follow the same format. An additional set of symbols work similarly to then describe the tile order.
 +
 +
The first tile must be located at one of the four corners. Add either NEO_TILE_TOP or NEO_TILE_BOTTOM and NEO_TILE_LEFT or NEO_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 NEO_TILE_ROWS or NEO_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 NEO_TILE_PROGRESSIVE or NEO_TILE_ZIGZAG to indicate the order. '''BUT'''…if NEO_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 NEO_TILE_PROGRESSIVE.
    
{{NeoPixel-UserGuide-TRAILER}}
 
{{NeoPixel-UserGuide-TRAILER}}
29 917

modifications

Menu de navigation