arduinohabib:
That will make it display a two on top of a seven.You first have to define which pins you connect abcdefg segments to in your sketch. Then if you type zero(); then the seven segment display will display zero, one(); will display one, etc. zerooff(); will turn zero off. clearall(); will turn everything off. This is an example:
But then you either have to know what the current display is or call clearAll() which is slow because it writes every segment multiple times.
Wouldn't it be better to have "two()" and "seven()" turn off the segments they don't need as well as turn on the ones they do?