Following code works fine, but I do not understand why.
The array contains 10 items, the index for the counter is 16; for counter > 10, which value of the array is getting to sent out?
byte seven_seg_digits_dec[] = { B11111100, // = 0
B01100000, // = 1
B11011010, // = 2
B11110010, // = 3
B01100110, // = 4
B10110110, // = 5
B10111110, // = 6
B11100000, // = 7
B11111110, // = 8
B11100110, // = 9
};
void loop() {
for (int bin = 0b0000; 16 > bin; bin++)
{
digitalWrite(latchPin1, LOW);
shiftOut(dataPin1, clockPin1, LSBFIRST, seven_seg_digits_dec[bin]);
digitalWrite(latchPin1, HIGH);
}