I apologize, I got carried away and I was going too fast.
I think maybe what you meant was something like this:
You can see I put a blinking decimal point after the last digit.
I also arranged the digits in the array into forwards order, to help it be less confusing.
Code here:
// define the LED digit patterns, from 0 - 15, plus a blank and decimal point
// 1 = LED on, 0 = LED off, in this order:
//74HC595 pin Q0,Q1,Q2,Q3,Q4,Q5,Q6,Q7
byte seven_seg_digits[18] = {
B11111100, // = 0
B01100000, // = 1
B11011010, // = 2
B11110010, // = 3
B01100110, // = 4
B10110110, // = 5
B10111110, // = 6
B11100000, // = 7
B11111110, // = 8
B11100110, // = 9
B11101110, // = A
B00111110, // = B
B10011100, // = C
B01111010, // = D
B10011110, // = E
B10001110, // = F
B00000000, // = blank
B00000001 // = decimal point
};
// connect to the ST_CP of 74HC595 (pin 9,latch pin)
int latchPin = 9;
// connect to the SH_CP of 74HC595 (pin 10, clock pin)
int clockPin = 10;
// connect to the DS of 74HC595 (pin 8)
int dataPin = 8;
void setup() {
// Set latchPin, clockPin, dataPin as output
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
// display a number on the digital segment display
void sevenSegWrite(byte digit) {
// set the latchPin to low potential, before sending data
digitalWrite(latchPin, LOW);
// the original data (bit pattern)
shiftOut(dataPin, clockPin, LSBFIRST, seven_seg_digits[digit]);
// set the latchPin to high potential, after sending data
digitalWrite(latchPin, HIGH);
}
void loop() {
// count from 0 to 15
for (byte digit = 0; digit <= 15; digit++) {
sevenSegWrite(digit);
delay(1000);
}
// show blinking decimal point for 5 seconds
sevenSegWrite(17);
delay(1000);
sevenSegWrite(16);
delay(1000);
sevenSegWrite(17);
delay(1000);
sevenSegWrite(16);
delay(1000);
sevenSegWrite(17);
delay(1000);
}