Hi!
I'm new to Arduino and I've got a question to the following code.
I made a 7-segment display which counts fast to 880. The code works fine,
but how can I add the feature that the dot of the 2. digit will be continuously shine?
I played already with the numbers like 88.0 or 88,0.
Best and thanks,
Benjamin
#include "SevSeg.h"
SevSeg sevseg; //Instantiate a seven segment controller object
unsigned long timer = 00.0;
int counter = 00.0;
#define period 14ul // increase counter each "period" milliseconds
#define maxCounter 879 // maximum value of counter
void setup() {
byte numDigits = 3;
byte digitPins[] = {12, 9, 8, 13};
byte segmentPins[] = {11, 7, 5, 3, 2, 10, 6, 4};
bool leadingZeros = true; // Use 'true' if you'd like to keep the leading zeros
bool updateWithDelays = false; // Default. Recommended
sevseg.begin(COMMON_CATHODE, numDigits, digitPins, segmentPins);
sevseg.setBrightness(80);
timer = millis(); // init timer
}
void loop() {
while (counter <= maxCounter) {
if (millis() - timer >= period) {
timer = millis();
counter++;
sevseg.setNumber(counter, 880);
}
sevseg.refreshDisplay(); // Must run repeatedly
}
// end of while loop
counter = 879,2;
}
/// END ///