#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#include "font.h"
// Turn on debug statements to the serial output
#define DEBUG 1
#if DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTX(x) Serial.println(x, HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif
// 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 8
#define CLK_PIN 18
#define DATA_PIN 23
#define CS_PIN 15
// HARDWARE SPI
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
// SOFTWARE SPI
//MD_Parola P = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
// Global message buffers shared by Serial and Scrolling functions
#define BUF_SIZE 10
char curMessage[BUF_SIZE] = { "64651635" };
void setup()
{
SPI.begin(CLK_PIN, GPIO_NUM_19, DATA_PIN, CS_PIN);
Serial.begin(115200);
P.begin();
P.setFont(OnlyDigits);
P.setCharSpacing(0); // double height --> double spacing
P.print(curMessage);
}
void loop()
{
}