Updated Matrix Panels Support (markdown)

Michael Miller
2016-03-21 10:09:31 -07:00
parent 5f21d48506
commit 47a13b567f

@@ -1,57 +1,27 @@
(under construction) NeoPixelBus uses a single index value to identify the pixel on the bus you want to access. While this is intuitive for strips and rings of pixels, its much less so for matrix or even tiled sets of matrix panels.
## Layouts This library supports several layered approaches to accessing matrix panels in an intuitive manor. If you have a single matrix panel, then you want to use the NeoTopology class. If you have a tiled collections of matrix panels, then you will want to use either NeoTiles or NeoMosaic.
### RowMajorLayout
The first item is in the upper left. Then the numbering within the layout moves through the row, then continues on the left of the next row.
```
00 01 02 03
04 05 06 07
08 09 10 11
12 13 14 15
```
There are three related objects with the same layout, but they are rotated 90, 180, and 270 degrees clockwise.
RowMajor90Layout -
RowMajor180Layout -
RowMajor270Layout -
### RowMajorAlternatingLayout With all three of these classes, you will need to know how the pixels on the matrix panels are ordered, and this is where the Layout feature classes come in.
The first item is in the upper left. Then the number within the layout moves through the row, then continues on the right of the next row moving toward the left; repeating this alternating pattern through the layout.
```
00 01 02 03
07 06 05 04
08 09 10 11
15 14 13 12
```
There are three related objects with the same layout, but they are rotated 90, 180, and 270 degrees clockwise.
RowMajorAlternating90Layout -
RowMajorAlternating180Layout -
RowMajorAlternating270Layout -
### ColumnMajorLayout ## [Layouts](https://github.com/Makuna/NeoPixelBus/wiki/Layout-objects)
The first item in in the upper left. Then the number within the layout moves down the column, then continues on the top of the next column moving downward again. The layout objects are a collection of "feature" classes that define how items in a 2d grid are ordered. They include the following.
``` * RowMajorLayout
00 04 08 12 * RowMajor90Layout
01 05 09 13 * RowMajor180Layout
02 06 10 14 * RowMajor270Layout
03 07 11 15 * RowMajorAlternatingLayout
``` * RowMajorAlternating90Layout
There are three related objects with the same layout, but they are rotated 90, 180, and 270 degrees clockwise. * RowMajorAlternating180Layout
ColumnMajor90Layout - * RowMajorAlternating270Layout
ColumnMajor180Layout - * ColumnMajorLayout
ColumnMajor270Layout - * ColumnMajor90Layout
* ColumnMajor180Layout
### ColumnMajorAlternatingLayout * ColumnMajor270Layout
The first item is in the upper left. Then the number within the layout moves down the column, then continues on the bottom of the next column moving upward toward the top; repeating this alternating pattern through the layout. * ColumnMajorAlternatingLayout
``` * ColumnMajorAlternating90Layout
00 07 08 15 * ColumnMajorAlternating180Layout
01 06 09 14 * ColumnMajorAlternating270Layout
02 05 10 13
03 04 11 12
```
There are three related objects with the same layout, but they are rotated 90, 180, and 270 degrees clockwise.
ColumnMajorAlternating90Layout -
ColumnMajorAlternating180Layout -
ColumnMajorAlternating270Layout -
## [NeoTopology]() ## [NeoTopology]()
This object is constructed with a method from above to provide the mapping from the 2d coordinate system to index that the NeoPixelBus requires. This object is constructed with a method from above to provide the mapping from the 2d coordinate system to index that the NeoPixelBus requires.