4 Digit 7 segment LED Display Question

Hello,

it’s a Common Cathode version if that matters.

Yes that does matter as it changes how you control the digits.

// pins 10 and 12 turn on the whole digit: HIGH is on

From this I assume pins 10 and 11 are connected directly to the common cathode of each digit?
If that is the case, as the cathode connects to ground, LOW would be on not HIGH.

And the same is true for the Anodes, they connect to positive supply, so HIGH is on and LOW is OFF.
Although having said that, the code seem's to be in the correct order, just your comments are wrong.

// Turn the Digits off
  digitalWrite(10, HIGH);   
  digitalWrite(12, HIGH);   

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

I'm not sure about the leakage, but if the digital output for the segment that is off, is still turning off when the digit is turned on, it may appear feint.

I would try adding a very small delay between setting the segments and switching the digit on.
Or of course wait for a more conclusive answer from an expert :stuck_out_tongue:

Just what I would try while waiting :slight_smile:

Dean