7-Segment display to Arduino in tinker cad
Components Required :
Arduino UNO
Common Cathode 7-Segment Display (standard in Tinkercad)
220Ω resistors (x7)
Breadboard
Jumper wires
Circuit Setup:
Place the 7-segment display on the breadboard.
Connect each segment pin (a–g) to Arduino digital pins through 220Ω resistors.
Connect both common cathode pins (COM) to GND on Arduino.
Make sure you connect resistors to prevent LEDs from burning out.
Below is the code to display the numbers on the 7 segment display.
Number 0 and 1:
For number 0 to be displayed in the 7 segment display pins 11,10,7,8,9,12 should be high and pin 13 should be low.
For number 1 to be displayed in the 7 segment display pins 11,8,9,12 should be low and pin 10,7 should be high.
Number 2: Number 3:
For number 2 to be displayed in the 7 segment display pins 13,11,10,8,9, should be high and pin 7,12 should be low.
For number 3 to be displayed in the 7 segment display pins 11,10,7,8,13 should be low and pin 9,12 should be low.
Number 4 and Number 5:
For number 4 to be displayed in the 7 segment display pins 7,10,12,13 should be high and pin 8,9,11 should be low.
For number 5 to be displayed in the 7 segment display pins 7,8,11,12,13 should be low and pin 10,9 should be high
CLICK BELOW LINK TO TRY IT IN TINKERCAD