RGB Panel Hookup Guide
Arduino Library Installation
Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.
Our example code is going to make use of Adafruit's most excellent RGBMatrixPanel library, which also requires their AdafruitGFXLibrary. You can obtain these libraries through the Arduino Library Manager by searching for those names. Or you can manually install them can by grabbing both of them [RGBMatrixPanel and AdafruitGFXLibrary] from their GitHub repositories.
For your convenience, we packaged those libraries with the serial paint example code used in the tutorial:
Library Examples
The RGBMatrixPanel library includes a number of fun examples to help show how the library can be used. They're awesome. Check them out under the File_ > Examples > _RGBMatrixPanel menu in Arduino. (Definitely check out the Plasma_16x32 or Plasma_32x32 examples!). Make sure to adjust the code based on your hardware hookup. In this tutorial, we physically connected the clock pin to 11. Therefore, you need to adjust the defined CLK pin from
language:c
// If your 32x32 matrix has the SINGLE HEADER input,
// use this pinout:
#define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega)
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3
to:
language:c
// If your 32x32 matrix has the SINGLE HEADER input,
// use this pinout:
#define CLK 11 // MUST be on PORTB! (Use pin 11 on Mega) <---CHANGE!
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3
64
" as a parameter when creating an instance of the RGBmatrixPanel class:
RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 64);