The WS2812 Integrated Light Source is a full-color LED. Red, green and blue LEDs are integrated alongside a driver chip into a surface-mount package controlled through a single wire. This panel has 64 bright RGB LEDs , arranged in an 8×8 matrix, each pixel is individually addressable. Only one microcontroller pin is required to control all the LEDs, and you get 24 bit color for each LED.
There are two 3-pin connection ports – one input and one output to the next panel. Provide 5VDC to the +5V pin and ground to GND pin, then connect the DIN pin to your Arduino. You’ll also need to make a common ground from the 5V power supply to the Arduino. Since each LED can draw as much as 60mA use at least 5V 2A power supply.
You can chain these together. Connect the DIN of the second panel to the first panel’s DOUT. Also connect a ground pin together and power with 5V. You can chain as many as you’d like, you will need a 5V 10A power supply for chaining 4 of these!
Using the Adafruit Library
Install Adafruit_NeoPixel via Library Manager
From the Sketch menu – Include Library – Manage Libraries and search for NeoPixel, then click on the Install button. After it’s installed, you can click the close button.
Open the strandtest example
Launch the Arduino IDE. From the File menu, select Sketchbook – Libraries – Adafruit_NeoPixel – strandtest
The first line assigns the Arduino pin connected to DIN.
The last line declares a NeoPixel object with three parameters:
1. The number of Pixels in the strip. In the example this is set to 64, change this to match the actual number you’re using.
2. The pin number to which the Matrix is connected.
3. A value indicating the type of Pixels that are connected.
Using the FastLED library
Install the FastLED via Library Manager
From the Sketch menu – Include Library – Manage Libraries and search for FastLED, then click on the Install button. After it’s installed, you can click the close button.
Open the DemoReel100 example and make sure the following lines are set as shown below.
#define DATA_PIN 3 – the Arduino pin connected to DIN
#define NUM_LEDS 64 – Number of Pixels in this case 64
Check your connections. The most common mistake is connecting to the output end of a strip rather than the input – this will light up all leds. Reversing 5V and GND will burn the microcontroller. If only few rows are working check that you’ve set he right number of pixels(64) or rows/columns 8,8 depending on the library you are using. Make sure you are connecting to the pin set in #define PIN.