"Enjoy life in His fold. Stop worrying because there is hope."

Now, we will be studying how to display numbers (or even some letters) to the 7-segment display on your Arduino-compatible board (I wrote an article on how to create your own Arduino-compatible board which you might want to see first : My First DIY Arduino Board.

Now, attach the 7-segment display component to the breadboard as shown in the image below:

After attaching the 7-segment display, connect the corresponding pins of this component to the digital pins of the Atmega328 microcontroller. Please refer to the discussion above regarding pin assignments to the microcontroller (or Arduino-compatible board):

Attach the FTDI Seria to TTL module to the breadboard, connecting its pins to its respective Atmega328 pin counterpart (Details of the FTDI Serial to TTL module is discussed in my previous articles):

Now, the next thing to be done is to prepare your code, to light up the segments.Basically each segment is assigned to a digital pin as discussed above. If we set the digital pin to HIGH, then the corresponding segment for that digital pin lights up. Numbers or even some letters are created by lighting up several combinations of segments. Below is my sample code for the 7-segment display:

Compile the code above (CTRL-R in the Arduino IDE), and upload this sketch to the microcontroller (CTRL-U in the Arduino IDE). Once successful, you should be seeing the 7-segment display component displaying the digit 5, as seen from the image below:

Thank you very much for reading this tutorial, guys! Hope this helps. You might want to do some experiments, like displaying the digits from 0 to 9 every second. Try it! Let me know how you go.