Documentation and assets for the hexagonal LED matrix featuring 144 WS2812B-B/W LEDs arranged in a hexagonal pattern.
| IN Connector | |
|---|---|
| IN | Data input signal |
| 5V | Power supply (5V DC) |
| GND | Ground connection |
| OUT Connector | |
|---|---|
| OUT | Data output (for chaining) |
| 5V | Power supply (5V DC) |
| GND | Ground connection |
For programming patterns and animations, refer to the diagram below to understand the LED ordering within the matrix.
This matrix is useful for converting 2D images stored in a standard square format to the specific layout of the LED matrix. It maps each LED's position in the matrix to its corresponding image pixel. Entries with a value of -1 indicate positions that do not correspond to an actual LED and should be ignored.
const short convertMat[16][14] = {
{-1, -1, -1, -1, 0, 1, 2, 3, 4, 5, -1, -1, -1, -1},
{-1, -1, -1, 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, -1},
{-1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, -1, -1},
{-1, -1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, -1},
{-1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, -1},
{-1, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, -1},
{58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71},
{72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85},
{-1, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, -1},
{-1, 98, 99,100,101,102,103,104,105,106,107,108,109, -1},
{-1, -1,110,111,112,113,114,115,116,117,118,119, -1, -1},
{-1, -1,120,121,122,123,124,125,126,127,128,129, -1, -1},
{-1, -1, -1,130,131,132,133,134,135,136,137, -1, -1, -1},
{-1, -1, -1,138,139,140,141,142,143,144,145, -1, -1, -1},
{-1, -1, -1, -1,146,147,148,149,150,151, -1, -1, -1, -1},
{-1, -1, -1, -1, -1,152,153,154,155, -1, -1, -1, -1, -1}
};
Install the Adafruit NeoPixel library:
Sketch → Include Library → Manage Libraries → Search "Adafruit NeoPixel"
Add to your platformio.ini:
lib_deps =
adafruit/Adafruit NeoPixel
https://github.com/FoxLabsFr/MatrixController.git
#include <Adafruit_NeoPixel.h>
#define PIN 6 // Data pin connected to DIN of the LED matrix
#define NUMPIXELS 144 // Number of LEDs in the matrix
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin(); // Initialize the NeoPixel library.
}
void loop() {
for (int i = 0; i < NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(255, 0, 0)); // Set all LEDs to red
pixels.show(); // Update the LED matrix
delay(50);
}
}
Built with ❤️ by FoxLabs
This page was generated with AI assistance.