Skip to main content

Quick Start

Wire the grid to your controller with three wires, install the library and run its SetPixel example. Five pixels light up in known places, which shows that power, data and the (x, y) coordinates all work.

You program the controller connected to this breakout. The breakout itself is not flashed.

1. Connect the breakout board​

Solder the included header pins to the board first. The grid takes its 5 V supply on VCC and its data on DIN. The library's examples send the data from pin 6 of the controller.

ControllerSoldered Smart LED WS2812B Grid 8x8
5VVCC
GNDGND
Pin 6DIN

VCC needs 4.5 V to 5.3 V, so never connect it to a higher voltage. The LEDs read DIN as high only from 0.7 x VCC, which is 3.5 V at a 5 V supply, so a 3.3 V data signal is below what the LEDs are specified for. The examples set the brightness to 40 out of 255 to keep the current low.

DOUT is the output to the next grid in a chain. Leave it free for now.

2. Install the library​

Install Soldered WS2812B Grid by downloading it from its GitHub repository and adding the ZIP in Arduino IDE (see the tip below).

🔗Soldered WS2812B Grid

Verified Arduino library at commit 4a1991f

→

Tip: downloading from GitHub. Open the library at commit 4a1991f with the link above, click the green Code button there and choose Download ZIP, then add it in Arduino IDE with Sketch → Include Library → Add .ZIP Library....

3. Run the first example​

This is SetPixel.ino, the library's own example. It sets the brightness to 40, lights five pixels by their (x, y) position and pushes them to the grid with show(). If you wired DIN to another pin, change PIN to match.

Select Board
SetPixel.ino
/**
**************************************************
*
* @file SetPixel.ino
* @brief Basic usage: set individual pixels by (x, y) coordinates on the
* Soldered 8x8 WS2812B LED grid.
*
* Connect the grid data line to PIN below.
* (0, 0) is top-left. X increases to the right, Y increases downward.
*
* @authors Josip Šimun Kuči @ soldered.com
***************************************************/

#include "WS2812Grid-SOLDERED.h"

#define PIN 6

WS2812Grid grid(PIN);

void setup()
{
grid.begin();

// Set overall brightness (0 = off, 255 = full).
// Keep this low to avoid excessive current draw.
grid.setBrightness(40);

// Draw a red pixel at the top-left corner
grid.setPixel(0, 0, 255, 0, 0);

// Draw a green pixel at the top-right corner
grid.setPixel(7, 0, 0, 255, 0);

// Draw a blue pixel at the bottom-left corner
grid.setPixel(0, 7, 0, 0, 255);

// Draw a white pixel in the centre using a packed color
grid.setPixel(3, 3, WS2812Grid::Color(255, 255, 255));
grid.setPixel(4, 4, WS2812Grid::Color(255, 255, 255));

// Push all changes to the hardware
grid.show();
}

void loop()
{
// Nothing to do — pixels stay lit
}

4. Check the result​

There is no serial output. Right after the upload, the top-left pixel (0, 0), where the data enters, lights red, the top-right pixel (7, 0) green and the bottom-left pixel (0, 7) blue. The two pixels at (3, 3) and (4, 4), in the middle of the grid, light white. They stay lit, because loop() does nothing.

We ran this on a 5 V Arduino-compatible board with the data line on pin 6, with Arduino IDE 2.3 and the library at commit 4a1991f, and the grid showed exactly these five pixels.

Set pixels explains every function the sketch uses.

5. If it does not work​

Continue with Troubleshooting and retry this smallest example after each change.