100% found this document useful (2 votes)
265 views1 page

Max7219 Dot Matrix Esp32

This document summarizes how to interface an LED dot matrix display with MAX7219 driver to an ESP32 microcontroller. It defines the hardware connection pins between the ESP32 and MAX7219, including the clock, data and chip select pins. It initializes the dot matrix display library and sets the text alignment and inversion to demonstrate printing and positioning text on the display from the ESP32.

Uploaded by

Gilberto Carlos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
265 views1 page

Max7219 Dot Matrix Esp32

This document summarizes how to interface an LED dot matrix display with MAX7219 driver to an ESP32 microcontroller. It defines the hardware connection pins between the ESP32 and MAX7219, including the clock, data and chip select pins. It initializes the dot matrix display library and sets the text alignment and inversion to demonstrate printing and positioning text on the display from the ESP32.

Uploaded by

Gilberto Carlos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//LED Dot Matrix Display with ESP32 and MAX7219

//https://microcontrollerslab.com/led-dot-matrix-display-esp32-max7219/

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

// Uncomment according to your hardware type


#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
//#define HARDWARE_TYPE MD_MAX72XX::GENERIC_HW

// Defining size, and output pins


#define MAX_DEVICES 4
#define CLK_PIN 18 // or SCK
#define DATA_PIN 19 // or MOSI
#define CS_PIN 5 // or SS

MD_Parola Display = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN,


MAX_DEVICES);

void setup() {

Display.begin();
Display.setIntensity(0);
Display.displayClear();
}

void loop() {
Display.setTextAlignment(PA_LEFT);
Display.print("ESP32");
delay(2000);

Display.setTextAlignment(PA_CENTER);
Display.print("ESP32");
delay(2000);

Display.setTextAlignment(PA_RIGHT);
Display.print("ESP32");
delay(2000);

Display.setTextAlignment(PA_CENTER);
Display.setInvert(true);
Display.print("ESP32");
delay(2000);

Display.setInvert(false);
delay(2000);
}

You might also like