#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define MAX_DEVICES 4 // 4 blocks
#define CS_PIN 21
#define CLK_PIN 18
#define DATA_PIN 23
// create an instance of the MD_Parola class
MD_Parola ledMatrix = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
void setup() {
ledMatrix.begin(); // initialize the LED Matrix
ledMatrix.setIntensity(0); // set the brightness of the LED matrix display (from 0 to 15)
ledMatrix.displayClear(); // clear LED matrix display
ledMatrix.displayText("Warung Mama Azka - Murah Meriah", PA_CENTER, 100, 50, PA_SCROLL_LEFT, PA_SCROLL_LEFT); // setup text scroll
}
void loop() {
if (ledMatrix.displayAnimate()) { // animasi teks berjalan
ledMatrix.displayReset(); // reset animasi agar berulang
}
}