#include "SevSeg.
h"
SevSeg sevseg; //Instantiate a seven segment controller object
#define MAX_NUMBER_STRINGS 12
#define MAX_STRING_SIZE 8
char testStrings[MAX_NUMBER_STRINGS][MAX_STRING_SIZE];
#define PATTERN_CHANGE_TIME 1000
unsigned long timer = millis() - PATTERN_CHANGE_TIME;
byte testStringsPos = 0;
void setup() {
byte numDigits = 4;
byte digitPins[] = {2, 3, 4, 5};
byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};
bool resistorsOnSegments = false; // 'false' means resistors are on digit pins
byte hardwareConfig = COMMON_ANODE; // See [Link] for options
bool updateWithDelays = false; // Default. Recommended
bool leadingZeros = false; // Use 'true' if you'd like to keep the leading zeros
[Link](hardwareConfig, numDigits, digitPins, segmentPins,
resistorsOnSegments, updateWithDelays, leadingZeros);
[Link](90);
// Adds set of test strings with periods in various places
strcpy(testStrings[0], "LOVE");
strcpy(testStrings[1], "LOVE");
strcpy(testStrings[2], "L.");
strcpy(testStrings[3], "LO.");
strcpy(testStrings[4], "LOV.");
strcpy(testStrings[5], "LOVE.");
strcpy(testStrings[6], "L.O.V.E");
strcpy(testStrings[7], "LOVE");
strcpy(testStrings[8], "LOVE");
strcpy(testStrings[9], "L.O.V.E");
strcpy(testStrings[10], "LOVE");
strcpy(testStrings[11], "LO.V.E");
}
void loop() {
if (millis() > (timer + PATTERN_CHANGE_TIME)) {
[Link](testStrings[testStringsPos]);
testStringsPos++;
if (testStringsPos >= MAX_NUMBER_STRINGS) testStringsPos = 0;
timer = millis();
}
[Link]();
}