Ardumotive Arduino Greek Playground
  • Home
    • About us
    • Contact
    • License
  • Arduino
    • Tutorials
    • Workshop
  • Raspberry Pi
  • DIY 3D Printer
  • News
    • Events >
      • Unboxing & Review
    • Blog
The 1st Arduino Playground in Greece - Open Source Hardware

Arduino simple countdown timer with 7 segment display

Available Languages
Picture
Picture

Introduction 

Published date: 30/04/2016
Picture
In this  guide I will show you how to make a simple - two digit - countdown timer by using the Arduino uno board and 7 segment displays.

We will be able to set the timer in our program sketch by changing the value of one variable. We will use two digit seven segment displays, so the maximum countdown time will be 99 seconds. When the timer will be equal with zero, we will hear an buzzer tone.

Here you can find more info and one simple Arduino tutorial with 7 segment display​.

So, let's get started!

What you will need - Hardware

Picture
For this project we will need:
  • Arduino uno
  • breadboard
  • 2 digits 7 segment displays*
  • buzzer
  • some breadboard cables

(*you can use common cathode or common anode type)

The Circuit 

Picture
The connections are pretty easy, see the above image with the breadboard circuit schematic.
(if you want you can connect one 220 Ohm resistor to each pin - except "CC" or "CA")
Picture

The Code

Here's the code, embedded using Codebender!
Try downloading the Codebender plugin and clicking on the "Run on Arduino" button to program your Arduino board with this sketch. And that's it, you've programmed your Arduino board directly from your browser! It's really amazing.
  • numOfDigits = 2 We have two digits 7 segment display.
  • digitPins [numOfDigits] = {3,4} CC or CA pins of them connected to Arduino pin 3 and 4.
  • disp.setDutyCycle(50) Control brightness of the display - "50" is 50% of led brightness.
  • disp.write(number) Print a number from 0 to 99 (because we have two digits)
If you want to change the timer just click the "Edit" button and change the value of "timer" variable. Value must be bigger of zero and lower (or equal) of 99.
(if you have common anode 7 seg display type just delete the line 24 "disp.setCommonCathode();")
Note: If you will not use the Codebender IDE for programming your Arduino board you will need to manual install the SevenSeg library in your Arduino IDE. Where to find it? Search the web, don't ask me... Or just use the easy and simple way of Codebender.

Well done!

That's it! You have successfully completed this guide and now you have your own simple Arduino countdown timer. If you want to restart the timer, just press the reset button.
​I hope you liked this, let me know in the comments!
Picture

Search Engine

Picture

Licence 

Picture

Help us to grow up!

Picture


Donate us
About us
License
Cookies policy

Visit the biggest Arduino Shop in Greece!

Picture
find us on dwrean.net
find us on Codebender
find us on Instructables
Developed and designed by Vasilakis Michalis Copyright © 2013 Ardumotive All Rights Reserved
All trademarks referenced herein are properties of their
Powered by Create your own unique website with customizable templates.
Design by DivTag Templates
Ardumotive Arduino Greek Playground