NB: When pastign code you should wrap it in the code forum BB tags (see the # icon in the forum post editor), because you didn't part of your code was not visible (the array indexing).
const byte ledCharSet[128] =
{
// 00-0F: Hex digits
B01111110, B00110000, B01101101, B01111001, // 0123
B00110011, B01011011, B01011111, B01110000, // 4567
B01111111, B01111011, // 89
};
This is an array of bits to be set on the shift register output in order to display each character (note that they are inverted later on, 1's become 0's and vice-versa), the array is defined as 128 bytes, they are only using 10, the "Bxxxxxxxx" is a way to enter a byte as a binary string specifying each bit separately
void loop()
{
for(int i=0; i <= 128; ++i)
{
byte bitsToSend = ledCharSet[i];
For each of the bytes in the array already defined
// invert bitmas - we're using a common ANODE display.
// for common cathode, comment out the following line.
bitsToSend = bitsToSend ^ B11111111;
Invert the bits, eg 01111110 becomes 10000001
// turn off the output so the pins don't light up
// while you're shifting bits:
digitalWrite(latchPin, LOW);
// shift the bits out:
shiftOut(dataPin, clockPin, LSBFIRST, bitsToSend);
// turn on the output so the LEDs can light up:
digitalWrite(latchPin, HIGH);
Turn the outputs of the shift register off , shift the 8 bits into the register, and turn it on again
Should have read the code not the comment, they are putting latch low, shifting in data, and putting latch high. The outputs do not switch off (but they retain the previously latched data until it's relatched).
fadeInOut();
Fade the display in, and then out again