Seven Segment library for arduino,7 segment arduino library
In today's post, I am gonna share a new Arduino Library for Seven Segment Display. In my recent project, I got a chance to work on seven segment displays, I have worked on them using PIC microcontroller but haven't got a chance to use them with Arduino. So, now as usual when I started working on them, I started searching for Arduino Library but I kind of got disappointed after getting quite heavy libraries for seven segments, and after a lot of search I thought of designing my own Arduino library for seven segment display, which I am gonna share in this post. :)

It's not very advanced library as we know seven segment displays are not too complex, so its quite simple and using it you can quite easily display any numerical digit on the seven segment display. Moreover, I have also included an example with the library which will start the counter from zero on seven segment display and keep on incrementing till 9 and after that it will start again from zero. Moreover, I have also posted the example about Interfacing of Seven Segment Display with Arduino in Proteus using this library, it will help you in better understanding of How this library works. You can download the working Proteus Simulation as well as hex file from that post.

Download Arduino Library for Seven Segment Display

  • As I stated earlier, its a very simple Arduino Library for Seven Segment Display and it will only print the numeric on seven segment display, but I will work on it in future and will update it by adding more features in it.
  • So, first of all click the below button to download the Arduino library for seven segment display.

Download Arduino Library for Seven Segment Display

  • After downloading the library, place it in the libraries folder of your Arduino software.
  • Now close your Arduino software and open it again.
  • Go to File and then Examples and you will find SevenSegment in it and it will have an example which is named as Counting.

Functions in Arduino Library for Seven Segment Display

  • I have added quite few function in it which are very basic and are very easy to use.
  • The first function I have used is:
SevenSegment(int a,int b,int c,int d,int e,int f,int g);
  • In this function, you need to give the pins of Arduino with which you are attaching your seven segment display. It will called as shown below:
SevenSegment tep = SevenSegment(0,1,2,3,4,5,6);
  •  Now tep is our seven segment object and we are gonna use it in rest of the example.
  • The next function used in this arduino library for seven segment display is:
display(char c);
  • This function will display the numeric on seven segment display which you will provide it.
  • Moreover, it will automatically clear the screen before displaying any new character on the seven segment.
  • It is called in the example as shown below:
tep.display('1');
That's all for today, in this next post you can download the example of how to Interface Seven Segment Display Using Arduino in Proteus, it will help you in understanding of this library in detail.