4 Digit 7 segment LED Display Question

Hi,

The code you were using was for common cathode, as you have common anode firstly:

you need resistors in each of the seven cathodes

And secondly the code needs altering to:

void setup() {                
  pinMode(7, OUTPUT);  
  pinMode(2, OUTPUT);
  pinMode(10, OUTPUT);  
  pinMode(12, OUTPUT);  
}

void loop() {
  // pins 10 and 12 turn on the whole digit: HIGH is on
  // pins 2 and 7 turn on the top and bottom bars: HIGH is off 
  
  // Turn the Digits off
  digitalWrite(10, LOW);   
  digitalWrite(12, LOW);   

  // first digit, turn top bar on
  digitalWrite(7, LOW);    
  digitalWrite(2, HIGH);    
  
  // Turn on the Digit
  digitalWrite(10, HIGH);
  
  // sleep
  delayMicroseconds(10000);
  
  
  // repeat for digit 2 
  digitalWrite(10, LOW);   
  digitalWrite(12, LOW);   

  // second digit turn bottom bar on
  digitalWrite(7, HIGH);    
  digitalWrite(2, LOW);    
  
  digitalWrite(12, HIGH);
  delayMicroseconds(10000);

}

Using the code you were with a common anode display means, you were indeed switching all digits on, setting the bars then turning off the one you actually wanted to display it on.
So the bars were probably displaying on the opposite digits than you intended.

With the code above, everything should make sense?

(1)Turn off all digits
(2)Set up segments to display
(3)Turn on digit to display number

And I imagine the feint bar should now disappear, before you were turning the bar on just before you switched the digit off every time (hence it coming on for a tiny amount of time and appearing dim).

In terms of the 595, I am only just exploring this myself so I can't really offer any advice on that yet, but with that display (4 Anodes, 7 Cathodes) you can control the entire display from the Arduino to get the multiplexing sorted before adding the extra complexity of a shift register?