/*
* MD_Parola Transitions
* Author: Abran DRozario
*/
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
struct animations
{
textEffect_t anim_in; // Animation type
textEffect_t anim_out;// Animation type
const char * textOut; // Text to display
uint16_t speed; // Animation speed (multiplier for library default)
uint16_t pause; // pause (multiplier for library default)
textPosition_t just;
};
animations animList[] =
{
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "Merivale Bowling Center - 1916 Merivale Rd, Nepean, ON K2G 1E8", 3, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "Bowling Lanes, Arcade, Snack Bar, Bar and pub, Restaurant, Birthday Parties, Special Occasions and Receptions. MERIVALE BOWLING CENTRE - OTTAWA ALL AGES ENTERTAINMENT CENTRE. WE ARE OPEN FOR FIRST COME FIRST SERVE. OPEN 7 DAYS A WEEK, DAY AND NIGHT, WE ARE ALWAYS AROUND FOR A DAY OR AN EVENING OUT. WE HAVE 48 LANES WITH COMPUTERIZED SCORING, AN ARCADE, AND A FULLY LICENSED RESTAURANT. JOIN YOUR FRIENDS OR BRING YOUR FAMILY FOR GOOD TIMES TO BE HAD BY ALL! FRIDAY AND SATURDAY NIGHTS ARE ROCK & BOWL NIGHTS! THIS IS 5 PIN BOWLING AT ITS FINEST! DO NOT FORGET TO LIKE US ON FACEBOOK AND FOLLOW US ON TWITTER FOR IMPORTANT UPDATES!", 5, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "Hours of Operation:", 2, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "Mon-Thu: 10:00 am - 10:00 pm, Fri-Sat: 10:00 am - 11:59 pm, Sun: 10:00 am - 10:00 pm", 2, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "YES, WE ARE OPEN ON FAMILY DAY!", 2, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "YES, WE ARE OPEN ON THANKS GIVING DAY!", 2, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "YES, WE ARE OPEN ON EASTER!", 2, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "WE CLOSE ON JULY 1ST AND JULY 2ND.", 2, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "WE CLOSE ON THE 24/25TH OF DECEMBER AND REOPEN BOXING DAY THE 26TH FOR 5PM.", 2, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "YES, WE ARE OPEN ON NEW YEARS EVE FROM 10AM - 10PM. NEW YEARS DAY FROM 11AM - 10PM.", 2, 0, PA_LEFT },
{ PA_SCROLL_LEFT, PA_SCROLL_LEFT, "WE EVEN CLOSE FOR TWO DAYS DUE TO POWER OUTAGE EVEN THERE IS CLEANUP AFTER NATURAL DISASTERS SUCH AS HURRICANES, FLOODS, TORNADOES, DERECHOS, SEVERE THUNDERSTORMS, LANDSLIDES, AND SO ON.", 2, 0, PA_LEFT },
};
void setup() {
Serial.begin(9600);
P.begin();
Serial.println("Loading, Please Wait...");
delay(500);
Serial.println("Loaded.");
Serial.println("Welcome to Merivale Bowling Center");
for (uint8_t i=0; i<ARRAY_SIZE(animList); i++)
{
animList[i].speed *= P.getSpeed(); animList[i].pause *= 500;
}
}
void loop() {
static uint8_t i = 0; // text effect index
if (P.displayAnimate())// animates and returns true when an animation is completed
{
if (i == ARRAY_SIZE(animList))i = 0; // reset loop index
P.displayText(animList[i].textOut, animList[i].just, animList[i].speed,
animList[i].pause, animList[i].anim_in, animList[i].anim_out);
delay(1000);
i++; // then set up for next text effect
}
}
nano:12
nano:11
nano:10
nano:9
nano:8
nano:7
nano:6
nano:5
nano:4
nano:3
nano:2
nano:GND.2
nano:RESET.2
nano:0
nano:1
nano:13
nano:3.3V
nano:AREF
nano:A0
nano:A1
nano:A2
nano:A3
nano:A4
nano:A5
nano:A6
nano:A7
nano:5V
nano:RESET
nano:GND.1
nano:VIN
nano:12.2
nano:5V.2
nano:13.2
nano:11.2
nano:RESET.3
nano:GND.3
matrix1:V+
matrix1:GND
matrix1:DIN
matrix1:CS
matrix1:CLK
matrix1:V+.2
matrix1:GND.2
matrix1:DOUT
matrix1:CS.2
matrix1:CLK.2