//Include the required arduino libraries:
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
//Define hardware type ,size ,and output pins:
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define MAX_DEVICES 12
#define CS_PIN 10
#define DATA_PIN 11
#define CLK_PIN 13
//create a new instance of the MD_Parola class with hardware SPI connection
//MD_Parola myDisplay = MD_parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
//SETUP FOR SOFTWARE SPI:
MD_Parola myDisplay = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
void setup() {
//Initialize the object:
myDisplay.begin();
//set the intensity (brightness) of the display (0-15):
myDisplay.setIntensity(0);
//clear the display:
myDisplay.displayClear();
myDisplay.displayText("FAISAL",PA_CENTER,10,0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
//(Text, Letak, speed)
}
void loop() {
if (myDisplay.displayAnimate()){
myDisplay.displayReset();
}
// put your main code here, to run repeatedly:
}