Ссылка на сайт -
https://robotclass.ru/articles/nodemcu-iot-led-matrix/
Код с него:
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Max72xxPanel.h>
const char* ssid = "ESP MANAGER";
const char* pwd = "makemyday"; // пароль для WiFi точки
ESP8266WebServer server(80);
Max72xxPanel matrix = Max72xxPanel(8, 4, 1);
unsigned long ticker_next;
String tape = "RobotClass.ru";
int spacer = 1;
int width = 5 + spacer;
const char page[] =
"<html>"
"<meta charset=\"utf-8\">"
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"
"<title>Ticker control</title>"
"<body>"
"<form action=\"\" method=\"post\">"
"<input type=\"text\" name=\"text\"/>"
"<input type=\"submit\" value=\"Set text\">"
"</form>"
"</body>"
"</html>";
String utf8rus(String source){
int i,k;
String target;
unsigned char n;
char m[2] = { '0', '\0' };
k = source.length(); i = 0;
while (i < k) {
n = source[i]; i++;
if (n >= 0xC0) {
switch (n) {
case 0xD0: {
n = source[i]; i++;
if (n == 0x81) { n = 0xA8; break; }
if (n >= 0x90 && n <= 0xBF) n = n + 0x2F;
break;
}
case 0xD1: {
n = source[i]; i++;
if (n == 0x91) { n = 0xB7; break; }
if (n >= 0x80 && n <= 0x8F) n = n + 0x6F;
break;
}
}
} // switch
m[0] = n; target = target + String(m);
}
return target;
}
void handleSubmit(){
tape = utf8rus(server.arg("text"));
server.send(200, "text/html", page);
}
void handleRoot() {
if (server.hasArg("text")) {
handleSubmit();
} else {
server.send(200, "text/html", page);
}
}
void setup(void){
tape = utf8rus("Привет");
delay(1000);
WiFi.softAP(ssid);
server.on("/", handleRoot);
server.begin();
matrix.setIntensity(7);
}
void handleTicker(){
for ( int i = 0 ; i < width * tape.length() + matrix.width() - 1 - spacer; i++ ) {
matrix.fillScreen(LOW);
int letter = i / width;
int x = (matrix.width() - 1) - i % width;
int y = (matrix.height() - 8) / 2;
while ( x + width - spacer >= 0 && letter >= 0 ) {
if ( letter < tape.length() ) {
matrix.drawChar(x, y, tape[letter], HIGH, LOW, 1);
server.handleClient();
}
letter--;
x -= width;
}
matrix.write();
delay(50);
}
}
void loop(void){
server.handleClient();
handleTicker();
}
Пины к которым матрица подкючена - DIN - D7, CS - D8, CLK - D5