![]() Coordinate (0,0) for drawing graphics will always be at the top-left, regardless of the actual position of the first NeoPixel. ![]() The point of this setup is that the rest of the sketch never needs to think about the layout of the matrix. In the majority of cases with the latest NeoPixel products, you can simply leave this argument off…the example code is just being extra descriptive. The last argument is exactly the same as with the NeoPixel library, indicating the type of LED pixels being used. NEO_MATRIX_TOP + NEO_MATRIX_RIGHT + NEO_MATRIX_COLUMNS + NEO_MATRIX_PROGRESSIVE These values are all added to form a single value as in the above code. The row/column arrangement is indicated by further adding either NEO_MATRIX_COLUMNS or NEO_MATRIX_ROWS to either NEO_MATRIX_PROGRESSIVE or NEO_MATRIX_ZIGZAG. The first pixel must be at one of the four corners which corner is indicated by adding either NEO_MATRIX_TOP or NEO_MATRIX_BOTTOM to either NEO_MATRIX_LEFT or NEO_MATRIX_RIGHT. ![]() This indicates where the first pixel in the matrix is positioned and the arrangement of rows or columns. The next argument is the interesting one. On the shield this is hard-wired to digital pin 6, but standalone matrices are free to use other pins. The third argument - 6 - is the pin number to which the NeoPixels are connected. ![]() The first two arguments - 5 and 8 - are the width and height of the matrix, in pixels. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |