#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#define PIN 6 // Data pin connected to RGB matrix
// Matrix setup: 32 wide, 8 high
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(
32, 8, PIN,
NEO_MATRIX_TOP + NEO_MATRIX_LEFT +
NEO_MATRIX_ROWS + NEO_MATRIX_PROGRESSIVE,
NEO_GRB + NEO_KHZ800
);
void setup() {
matrix.begin();
matrix.setBrightness(40); // Adjust brightness as needed
}
void loop() {
// --- ART 1: Gradient stripes ---
for (int x = 0; x < 32; x++) {
uint16_t color = matrix.Color(x * 8, 255 - x * 8, (x * 4) % 255);
for (int y = 0; y < 8; y++) {
matrix.drawPixel(x, y, color);
}
}
matrix.show();
delay(2000);
// --- ART 2: Checkerboard pattern ---
matrix.fillScreen(0);
for (int x = 0; x < 32; x++) {
for (int y = 0; y < 8; y++) {
if ((x + y) % 2 == 0) {
matrix.drawPixel(x, y, matrix.Color(255, 0, 0)); // Red
} else {
matrix.drawPixel(x, y, matrix.Color(0, 0, 255)); // Blue
}
}
}
matrix.show();
delay(2000);
// --- ART 3: Diagonal rainbow ---
matrix.fillScreen(0);
for (int x = 0; x < 32; x++) {
for (int y = 0; y < 8; y++) {
uint16_t color = matrix.Color((x * 8) % 255, (y * 32) % 255, ((x + y) * 16) % 255);
matrix.drawPixel(x, y, color);
}
}
matrix.show();
delay(2000);
}FPS: 0
Power: 0.00W
Power: 0.00W