3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino 7 segment countdown timer

Step 4The programming!!!

THE CODE TIME!!! YAY!
This is my favourite part of any project, because i know it is almost complete!

I have wrote 2 programs: one that counts down from 20, and another that scrolls the message"Arduino" across the displays.

I will explain some of it in the code, just so you can understand it a bit better.

In the beginning, it initialises all the pins, and sets a few variables.

In the Void Setup, it sets up all the pins as outputs.
It also contains lots of FOR LOOPS, which are used when the LEDs are switched.

In the Void Loop, it sets pin 13 high and fades the 2 gnd pins on and off, which displays a pulsing 00.
« Previous StepDownload PDFView All StepsNext Step »
13 comments
Feb 3, 2012. 11:42 PMnickygiscool says:
hi i have built this timer and loaded the programme into my arduino but it just lights up the 7 segment display and then jumbles through a load of numbers really quickly. then it stops and starts pulsing. does anybody know why. please be simple, im new to arduino:)
Jul 26, 2010. 3:31 PMhonskie says:
where i can put this code???? on visual basic??
Jul 22, 2011. 7:45 PMtlegasse says:
No, download the arduino ide. You will need an arduino too.

arduino ide: http://www.arduino.cc/en/Main/Software

arduino: http://www.amazon.com/Arduino-UNO-board/dp/B004CG4CN4/ref=sr_1_1?ie=UTF8&qid=1311389063&sr=8-1
Dec 5, 2010. 11:09 AMI Build, Therefore I Am says:
Any chance you could update the code to have 8 digits displaying hours, minutes, seconds, milliseconds and colons (:) in between each?
I have some coding experience with arduino and I'd be willing to help.
Oct 27, 2009. 5:13 AMMr Jaderman says:
You know what you could do is just copy it from the Arduino IDE and then just paste on to your page here. Would GREATLY appreciate it.
 
Jul 5, 2010. 3:24 AMHeeth says:
Hi friend. This post on multiplexed Display was really very very useful but i have stuck in a problem. I want to display an temperature on the multiplexed display. I have used LM35 for temperature sensing and 7135 as ADC. Now when ADC is accessing the analog data and converting the data, my display is getting turned off. I have used timer for displaying, when the timer is overflown, its getting turned off for a while and getting turned on again. What to do friend?? Heeth
Aug 30, 2010. 12:06 AMcatprog says:
The code for converting the data is probably taking so long that you can see the delay in the timer. (if your using the Arduino IDE) in setup() ----------- Serial.begin(9600); ------ in the main code ------------- Serial.println("CONVERT START"); //Convert Code Data Serial.println("CONVERT END"); --------- Then you can use the Ardunio IDE to monitor the serial port to see what happens in the code.
Jul 5, 2010. 3:20 AMHeeth says:
Hi friend. This post on multiplexed Display was really very very useful but i have stuck in a problem. I want to display an temperature on the multiplexed display. I have used LM35 for temperature sensing and 7135 as ADC. Now when ADC is accessing the analog data and converting the data, my display is getting turned off. I have used timer for displaying, when the timer is overflown, its getting turned off for a while and getting turned on again. What to do friend?? Heeth
Jul 5, 2010. 3:15 AMHeeth says:
heyy, that was really useful for me. But i have a doubt. My multiplexed display is getting turned off for w while. I have used 7135 ADC and whenever 7135 gets data from from the source, my segments are getting turned off... What to do for that friends???
Feb 13, 2010. 11:57 AMTeslaling says:
You should try using PORTD instead of digitalWrite() because it will save code space and it will be faster.  Using PORTD would also fix the ghosting effect that is caused by the slower digitalWrite().
Oct 28, 2009. 5:33 AMMr Jaderman says:
I tried it again. When I clicked it, I saved it as, let's say, Arduino.pde and then it would save it as Arduino.pde.tmp as a tmp file and i can't change the file type.
 
Oct 27, 2009. 4:59 AMMr Jaderman says:
I can not open your script. I've tried everything I could think of. PLEASE help!
 
Oct 27, 2009. 9:05 PMReCreate says:
How could you not open it?
Its simply a text file, Rename it to .pde.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
11
Followers
5
Author:baharini
I'm a software developer, but I also love tinkering with electronics. My Instructables are all about Arduino.