Codey OnlineBiblioteka komponentów Arduino i ESP32 › LED Matrix Module MAX7219
LED Matrix Module MAX7219
Wyjście

LED Matrix Module MAX7219

To moduł wyświetlacza LED matrix wykorzystujący sterownik LED MAX7219 do obsługi matrycy LED 8x8. Zwykle podłącza się go do mikrokontrolera przez interfejs szeregowy podobny do SPI (piny data, clock i load/select), dzięki czemu można wyświetlać wzory, cyfry lub przewijane grafiki.

Szerokość: 36.2 mm

Pinout — LED Matrix Module MAX7219

Pin Sygnał Opis
OUT_CLK clock Serial clock passed to the next cascaded MAX7219 module output connector
OUT_CS chip-select Load/chip-select line passed to the next cascaded MAX7219 module
DOUT data Serial data output for daisy-chaining to the next MAX7219 module DIN
GND ground Ground reference for the module and cascade output connector
VCC power 5 V supply rail passed to the cascade output connector
IN_CLK clock Serial clock input from the microcontroller or previous MAX7219 module
IN_CS chip-select MAX7219 load/chip-select input; latch data on rising edge after shifting
DIN MOSI Serial data input from MCU MOSI or previous module DOUT
GND.1 ground Ground reference for the module input connector
VCC.1 power 5 V power input for the MAX7219 and LED matrix

Przykładowy schemat połączeń — LED Matrix Module MAX7219

Z Do Przewód
board:D13 x1:IN_CLK green
board:D10 x1:IN_CS blue
board:D11 x1:DIN yellow
board:5V x1:VCC.1 red
board:GND x1:GND.1 black

Przykładowy kod Arduino — LED Matrix Module MAX7219

Ten przykład został napisany i sprawdzony kompilacją dla arduino-uno. Codey Online dostosuje go do każdej innej obsługiwanej płytki.

#include <LedControl.h>

const int DIN_PIN = 11;
const int CLK_PIN = 13;
const int CS_PIN  = 10;

LedControl lc = LedControl(DIN_PIN, CLK_PIN, CS_PIN, 1);

void setup() {
  Serial.begin(9600);
  lc.shutdown(0, false);   // Wake up the MAX7219
  lc.setIntensity(0, 8);   // 0..15 brightness
  lc.clearDisplay(0);

  Serial.println("MAX7219 LED Matrix example started");
}

void loop() {
  // Light one pixel at a time across the 8x8 matrix.
  for (int row = 0; row < 8; row++) {
    for (int col = 0; col < 8; col++) {
      lc.clearDisplay(0);
      lc.setLed(0, row, col, true);
      Serial.print("Lighting row ");
      Serial.print(row);
      Serial.print(", column ");
      Serial.println(col);
      delay(120);
    }
  }

  // Clear the display briefly before repeating.
  lc.clearDisplay(0);
  delay(400);
}

Podobne komponenty

3W amplifier MAX98357A I2S DAC

3W amplifier MAX98357A I2S DAC

Active Buzzer Module

Active Buzzer Module

⚙️

LED

Passive Buzzer Module

Passive Buzzer Module

Zbuduj swój projekt Arduino lub ESP32 z pomocą AI

Opisz, co chcesz zbudować. Codey Online napisze kod, narysuje schemat połączeń, skompiluje projekt i wgra go na płytkę bezpośrednio z przeglądarki.

Zacznij za darmo