// ----------------------------------------------------------------------
// Using example: https://github.com/MajicDesigns/MD_Parola/blob/main/examples/Parola_HelloWorld/Parola_HelloWorld.ino
// Changes: Software instead of hardware SPI, 12 devices, different moving text
// ----------------------------------------------------------------------
// Program to demonstrate the MD_Parola library
//
// Simplest program that does something useful - Hello World!
//
// MD_MAX72XX library can be found at https://github.com/MajicDesigns/MD_MAX72XX
//
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
// #include <SPI.h>
// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define MAX_DEVICES 12
#define CLK_PIN 23
#define DATA_PIN 19
#define CS_PIN 22
// Software pins
MD_Parola P = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
void setup(void)
{
P.begin();
}
void loop(void)
{
if (P.displayAnimate())
P.displayText("-###############", PA_LEFT, P.getSpeed(), P.getPause(), PA_SCROLL_DOWN, PA_SCROLL_UP);
}