Bestilt før kl. 14.00 på hverdage = afsendt samme dag 30 dages fortrydelsesret 1 års garanti
← Terug til oversigten

Tilslutningsdiagram og kodeeksempel

Sådan tilslutter du 8x8 RGB 64 LED Matrix 5V WS2812b til en Arduino UNO eller ESP32, med en eksempelsketch, du kan uploade med det samme.

8x8 WS2812B RGB LED-matrix demo

Dette projekt viser en 8x8 WS2812B adresserbar RGB LED-matrix, der er tilsluttet direkte til en Arduino Uno. Sketchen initialiserer de 64 LEDs og viser et roterende farvemønster på matrixen ved et sikkert lysstyrkeniveau. Tilslut 5V-, GND- og DI-benene som vist for at teste din matrix på få minutter.

Tilslutningsdiagram: 8x8 RGB 64 LED Matrix 5V WS2812b på en Arduino UNO
Tilslutningsdiagram · Klik for at forstørre
Tilslutningstabel: 8x8 RGB 64 LED Matrix 5V WS2812b på en Arduino UNO
Tilslutningstabel · Klik for at forstørre
8x8_WS2812B_RGB_LED_Matrix_Demo.ino · kompileret og testet
/*
 * ==================================================================
 *  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);
}

Nødvendige biblioteker: Adafruit NeoPixel 1.15.5

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

WS2812B 8x8 RGB LED-matrix regnbue-demo

Dette projekt styrer en 8x8 WS2812B RGB LED-matrix med en ESP32. Det kører farverige regnbuemønstre hen over alle 64 individuelt adresserbare LEDs. Lysstyrken er sat lavt for at sikre sikker drift direkte via USB-strøm.

Tilslutningsdiagram: 8x8 RGB 64 LED Matrix 5V WS2812b på en ESP32 DevKit V1
Tilslutningsdiagram · Klik for at forstørre
Tilslutningstabel: 8x8 RGB 64 LED Matrix 5V WS2812b på en ESP32 DevKit V1
Tilslutningstabel · Klik for at forstørre
WS2812B_8x8_RGB_LED_Matrix_Rainbow_Demo.ino · kompileret og testet
/*
 * ==================================================================
 *  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);
  }
}

Nødvendige biblioteker: Adafruit NeoPixel 1.15.5

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

Set for nylig

Vindgenerator DC motorsæt med propel 60 mm

Vindgenerator DC motorsæt med propel 60 mm

€ 4,70
18650 Batteriholder med Lader og 5V Step-up module (USB-C)

18650 Batteriholder med Lader og 5V Step-up module (USB-C)

€ 7,65
PWM til spændingskonvertermodul 0-10V

PWM til spændingskonvertermodul 0-10V

€ 2,60
WCMCU-5102 module stereo DAC digital til analog konverter

WCMCU-5102 module stereo DAC digital til analog konverter

€ 9,95
KBPC5010 brokobler 1000V 50A 4-ben

KBPC5010 brokobler 1000V 50A 4-ben

€ 1,65
Kobling til hjul 30 mm / 5 mm

Kobling til hjul 30 mm / 5 mm

€ 2,00
Heatsink TO-220 Aluminium

Heatsink TO-220 Aluminium

€ 1,00
USB Step Up-kabel fra 5V til 12V

USB Step Up-kabel fra 5V til 12V

€ 3,20
Se