7 Segment Countdown

After the no resistor wiring, how many segments still light up?

Good idea. I tried to move the resister from pin 2 to 5V and run the simulator. It did not light up that segment.

The ?: is what is called the ternary operator

You use it like that

Condition ? Value if true : value if false

So here si say to write on pin 2 the value returned by

ledOn ? HIGH : LOW)

Which will be HIGH if ledOn is true and LOW otherwise

DeltaT is just a constant time I wait for before taking the next step.

Once all segments are ON I switch the value of ledOn to the opposite and thus the loop will turn the segments off.

If you have a common anode module you need to bring 5V to the common pin and through a resistor connect the others to a pin which you will set to LOW to turn the segment on and high to turn it off

Pictorial/Schematic representation for the above text:

To turn on segment-a, we execute the following codes:

pinMode(5, OUTPUT);
digitalWrite(5, LOW);     //

Hi, @DLO

Do you have a DMM? Digital MultiMeter?

Tom.... :smiley: :+1: :coffee: :australia:

Yes I do but I am traveling and only have my computer, not my Arduino kit. I’ll check next week. Another great idea!

Next time, do not forget o carry UNO R3 along with your computer.

Thanks to all of you for your insight. I took some valuable lessons away from this discussion. I appreciated the descriptive ideas with schematics, video suggestions and reminder about proper use of resistors. I suspected it was just a simple fix and that turned out to be the case! From the responses, I checked the 7 segment and switched it to cathode from anode. That solved the problem! Thanks again for your professional support!