User Manual
Library
Next up, load the testshapes_16x32 or testshapes_32x32 example sketch, which will test every drawing element
available (again, you may need to edit the pin numbers for the 32x32 panel).
The most simple thing you may want to do is draw a single pixel, we saw this introduced above.
Next we will fill the screen with green by drawing a really large rectangle. The first two arguments are the top left
point, then the width in pixels, and the height in pixels, finally the color
Next we will draw just the outline of a rectangle, in yellow
Next you may want to draw lines. The drawLine procedure will draw a line in any color you want, we used this to draw
a big X
The next shapes we draw are circles. You can draw the outline of a circle with drawCircle or fill a circle with fillCircle.
The first two arguments are the center point, the third argument is the radius in pixels, finally the color to use.
// draw a pixel in solid white
matrix.drawPixel(0, 0, matrix.Color333(7, 7, 7));
// fix the screen with green
matrix.fillRect(0, 0, 32, 16, matrix.Color333(0, 7, 0));
// draw a box in yellow
matrix.drawRect(0, 0, 32, 16, matrix.Color333(7, 7, 0));
// draw an 'X' in red
matrix.drawLine(0, 0, 31, 15, matrix.Color333(7, 0, 0));
matrix.drawLine(31, 0, 0, 15, matrix.Color333(7, 0, 0));
© Adafruit Industries https://learn.adafruit.com/32x16-32x32-rgb-led-matrix Page 35 of 44










