seven segment counter and count down

hello everyone can any body help me to do these:
when I press the switch on the seven segment display become counter like this 1,2,3,4,5, etc.. the when I press the switch off the seven segment display become count down like this 0,9,8,7,6,5, etc.. I want it become responsive for example I press the switch on it will count like this 1, 2, 3, and then when I press the switch off automatically it will count like this 2, 1, 0. I hope anyone can understand what I mean, sorry for my wrong grammar, thank you :slight_smile: using millis

I hope anyone can understand what I mean

No, because you posted no code and said nothing about how the switch is wired.

Some questions for you :

Do you know how to read a digital input ?
Do you know how to show a number on the 7 segment display ?
How many digits are displayed ?
Should the counting happen whilst the button is held down or should the number only change when a button becomes pressed ?
If the first, then how fast should the counting happen ?
What should happen when the count reaches 0 or (assuming only 1 digit) when it reaches 9 ?
What should happen if both buttons are pressed ?
What have you tried so far ?

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Thanks.. Tom.... :slight_smile: