SevSeg - Active dot on 7-segment display while counting

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 ///

Hi,
Welcome to the Forum.
Thanks for using code tags.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

One of the pins on the display should be the decimal point.
In fact you have 8 pins designated in your code.

If you look in the IDE Examples you will find under SevSeg exampls you will see "testwholedisplay" code.
This will give you info on how to use the decimal point.

Tom... :slight_smile:

Hi Tom,

thanks! I'm sure everything is connected right. The dot is Pin 3 which is on the Arduino on 4. Here is my circuit. I have no idea why the counter does not accept the dot.