Ordinato entro le 14:00 nei giorni lavorativi = spedito in giornata 30 giorni per il recesso Garanzia di 1 anno
← Torna alla panoramica

Schema di collegamento ed esempio di codice

Ecco come collegare il Matrice LED RGB 8x8 64 LED 5V WS2812b a un Arduino UNO o ESP32, con uno sketch di esempio che puoi caricare subito.

Demo matrice LED RGB WS2812B 8x8

Questo progetto mostra una matrice LED RGB indirizzabile WS2812B 8x8 collegata direttamente a un Arduino Uno. Lo sketch inizializza i 64 LEDs e visualizza un pattern di colori in rotazione sulla matrice a un livello di luminosità sicuro. Collega i pin 5V, GND e DI come mostrato per testare la tua matrice in pochi minuti.

Schema di collegamento: Matrice LED RGB 8x8 64 LED 5V WS2812b su un Arduino UNO
Schema di collegamento · Clicca per ingrandire
Tabella di collegamento: Matrice LED RGB 8x8 64 LED 5V WS2812b su un Arduino UNO
Tabella di collegamento · Clicca per ingrandire
8x8_WS2812B_RGB_LED_Matrix_Demo.ino · compilato e testato
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : 8x8 WS2812B RGB LED Matrix Demo
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : 8x8 RGB 64 LED Matrix 5V WS2812b
 *  Libraries : Adafruit NeoPixel 1.15.5
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <Adafruit_NeoPixel.h>

#define LED_PIN   6
#define LED_COUNT 64

Adafruit_NeoPixel matrix(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

// Converts (x, y) coordinates to pixel index (serpentine layout)
uint16_t getPixelIndex(uint8_t x, uint8_t y) {
  if (y % 2 == 0) {
    return y * 8 + x;
  } else {
    return y * 8 + (7 - x);
  }
}

void setup() {
  Serial.begin(115200);
  matrix.begin();
  matrix.setBrightness(30); // Keep brightness low when powered from Arduino 5V
  matrix.show();            // Turn off all pixels
  Serial.println(F("WS2812B 8x8 LED Matrix ready!"));
}

void loop() {
  static uint16_t hueOffset = 0;

  for (uint8_t y = 0; y < 8; y++) {
    for (uint8_t x = 0; x < 8; x++) {
      uint16_t pixelHue = hueOffset + ((x + y) * 65536L / 16);
      uint32_t color = matrix.gamma32(matrix.ColorHSV(pixelHue));
      matrix.setPixelColor(getPixelIndex(x, y), color);
    }
  }

  matrix.show();
  hueOffset += 500;
  delay(20);
}

Librerie necessarie: Adafruit NeoPixel 1.15.5

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Demo arcobaleno matrice LED RGB WS2812B 8x8

Questo progetto controlla una matrice LED RGB WS2812B 8x8 usando un ESP32. Fa scorrere motivi arcobaleno colorati su tutti i 64 LED indirizzabili singolarmente. La luminosità è impostata bassa per garantire un funzionamento sicuro direttamente tramite alimentazione USB.

Schema di collegamento: Matrice LED RGB 8x8 64 LED 5V WS2812b su un ESP32 DevKit V1
Schema di collegamento · Clicca per ingrandire
Tabella di collegamento: Matrice LED RGB 8x8 64 LED 5V WS2812b su un ESP32 DevKit V1
Tabella di collegamento · Clicca per ingrandire
WS2812B_8x8_RGB_LED_Matrix_Rainbow_Demo.ino · compilato e testato
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : WS2812B 8x8 RGB LED Matrix Rainbow Demo
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : 8x8 RGB 64 LED Matrix 5V WS2812b
 *  Libraries : Adafruit NeoPixel 1.15.5
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <Adafruit_NeoPixel.h>

#define LED_PIN    4
#define LED_COUNT  64
#define BRIGHTNESS 30

Adafruit_NeoPixel matrix(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  Serial.begin(115200);
  matrix.begin();
  matrix.setBrightness(BRIGHTNESS);
  matrix.show();
  Serial.println("WS2812B 8x8 Matrix Initialized");
}

void loop() {
  // Rainbow cycle across the matrix
  for (long firstPixelHue = 0; firstPixelHue < 5 * 65536; firstPixelHue += 256) {
    for (int i = 0; i < matrix.numPixels(); i++) {
      int pixelHue = firstPixelHue + (i * 65536L / matrix.numPixels());
      matrix.setPixelColor(i, matrix.gamma32(matrix.ColorHSV(pixelHue)));
    }
    matrix.show();
    delay(15);
  }
}

Librerie necessarie: Adafruit NeoPixel 1.15.5

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Visti di recente

Jumper Cap 2 Pins 2,54mm (Bianco) per es. Arduino, Esp32 e Raspberry Pi

Jumper Cap 2 Pins 2,54mm (Bianco) per es. Arduino, Esp32 e Raspberry Pi

€ 0,35
Alimentatore 12V 2A adattatore jack 5.5mm x 2.5mm

Alimentatore 12V 2A adattatore jack 5.5mm x 2.5mm

€ 6,99
Voltmetro AC 70 - 500V - Blu, 0.56inch, 2 Fili

Voltmetro AC 70 - 500V - Blu, 0.56inch, 2 Fili

€ 5,45
Vedi
Cappuccio jumper 2 pin 2,54 mm (Nero) per es. Arduino, Esp32 e Raspberry Pi

Cappuccio jumper 2 pin 2,54 mm (Nero) per es. Arduino, Esp32 e Raspberry Pi

€ 0,20
Kit di 225 O-ring NBR neri 15 misure diverse

Kit di 225 O-ring NBR neri 15 misure diverse

€ 7,80
Vedi
Voltmetro 70 - 500V - Verde, 0.56inch, 2 Fili

Voltmetro 70 - 500V - Verde, 0.56inch, 2 Fili

€ 5,45
Vedi
Clip di test a Dupont Female 10 pezzi

Clip di test a Dupont Female 10 pezzi

€ 3,90
cappuccio colorato per pulsante ot3321 VERDE

cappuccio colorato per pulsante ot3321 VERDE

€ 0,65