User Manual

Now that you've got it working here are a few things to look for:
The most useful line to look at is:
which is where we actually draw to the display. This code only draws one pixel at a time. The x and y coordinates are
the individual pixels of the display. (0,0) is in the top left corner, (31, 15) is in the bottom right (remember that we start
counting at 0 here!). To create a color, you will want to use the helper funciton Color333 which will take three 3-bit
numbers and combine them into a single packed integer. So for example, the first argument, r can range from 0 to 7.
Likewise for gand b. To make a pixel that is pure red, r would be 7 and g, b would be 0. To make a white pixel, set all
to 7. To make a black (off) pixel, set the colors to 0. A similar function, Color444, accepts three 4-bit numbers for up to
4096 colors.
Now we can open up the next example, which shows the rest of the library capabilities.
matrix.drawPixel(x, y, matrix.Color333(r, g, b));
© Adafruit Industries https://learn.adafruit.com/32x16-32x32-rgb-led-matrix Page 34 of 44