// Program to demonstrate the MD_Parola library
//
// Simplest program that does something useful - Hello!
// Uses the Arduino Print Class extension
//
// MD_MAX72XX library can be found at https://github.com/MajicDesigns/MD_MAX72XX
//
//#define D1_MINI
#define ESP32_C3_DEVKIT_1
//#define RP2040
#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::FC16_HW
#define MAX_DEVICES 8
#ifdef RP2040
#define CLK_PIN 2 //SPI0 SCK -> CLK
#define DATA_PIN 3 //SPI0 MOSI / TX -> DIN
#define CS_PIN 5 //SPI0 CS -> CSn
#endif
#ifdef D1_MINI
#define CLK_PIN 14 //SPI0 SCK -> CLK
#define DATA_PIN 13 //SPI0 MOSI / TX -> DIN
#define CS_PIN 15 //SPI0 CS -> CSn
#endif
#ifdef ESP32_C3_DEVKIT_1
#define CLK_PIN 6 //SPI0 SCK -> CLK
#define DATA_PIN 4 //SPI0 MOSI / TX -> DIN
#define CS_PIN 5 //SPI0 CS -> CSn
#endif
// Hardware SPI connection
// MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
// Arbitrary output pins
MD_Parola P = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
void setup(void)
{
P.begin();
P.setIntensity(0);
P.setTextAlignment(PA_CENTER);
P.print("Hellorld!");
}
void loop(void)
{
}