#include <SevSeg.h>
SevSeg Sveg;
uint16_t c = -93;
void setup() {
TCCR1A = 0;
TCCR1B = 0;
bitSet(TCCR1B, CS11);
bitSet(TCCR1B, CS10);
bitSet(TIMSK1, TOIE1);
byte hardwareConfig = COMMON_CATHODE;
byte numDigits = 4;
byte digitPins[] = {19, 18, 17, 20};
byte segmentPins[] = {2, 3, 4, 5, 6, 7, 8, 9};
bool resistorsOnSegments = true;
bool updateWithDelays = false;
bool leadingZeros = false;
bool disableDecPoint = false;
Sveg.begin(hardwareConfig, numDigits, digitPins,
segmentPins, resistorsOnSegments,
updateWithDelays, leadingZeros,
disableDecPoint);
Sveg.blank();
}
ISR(TIMER1_OVF_vect) {
c++;
}
void loop() {
char str[10];
snprintf(str, sizeof(str), "%d", c);
strcat(str, "*");
Sveg.setChars(str);
Sveg.refreshDisplay();
}