4-Digit Countdown Timer (in minutes and seconds)

Ғылым және технология

In this video, I'll demonstrate a slight modification to my previous Arduino TM1637 4-digit LED display code (from this video: • LED Displays ) so that, instead of just counting down integer values from 5000 - 0, it shows a timer counting down from one hour, displaying the value in mm:ss format.
I'm using an Arduino Nano and a TM1637 4-digit 7-segment display. The Arduino code is available on my Patreon page here: / playfultech

Пікірлер: 35

  • @saskiacurls6045
    @saskiacurls60452 жыл бұрын

    Thank You so much ! Best gift for Christmas

  • @nurulnasrah9167
    @nurulnasrah91675 жыл бұрын

    thank you good sir. you remind me that unsigned long exist :D so i've been trying to make a timer with 8 hours but fail since i declare it as int >< but watching you inspire me hahaha thank you really :)

  • @therkellorenzen804
    @therkellorenzen8045 жыл бұрын

    At 8:22 You say if you want something to happen at the end of the countdown you can place it in the loop function but the loop function in your video is outside the frame so where should it be placed? xD I have tried a few options but it never plays at the end, it just resets.

  • @UnveiledRacer48
    @UnveiledRacer486 жыл бұрын

    Great video mate, I was looking for something like this. Also if use that code in a "bomb type puzzle case" how would you change the code to subtract 5 mins from the clock for a "wrong" input (not completing understanding Arduino code yet). Any help would be great. Thanks.

  • @PlayfulTechnology

    @PlayfulTechnology

    6 жыл бұрын

    So, currently there's a line of code that looks like "timeRemaining = timeLimit - millis()". If you wanted to adapt that to include subtractions, you'd change it to something like "timeRemaining = timeLimit - millis() - penalties" instead. "penalites" would be an unsigned long variable, initialised at 0. Every time the player made a wrong input, you could add, say, a minute penalty by saying "if(playerMadeWrongInput) { penalties += 60000; }"

  • @nilavazhagan3659
    @nilavazhagan36595 жыл бұрын

    how to blink the colon in 1sec on/off ,consider digital clock

  • @davidmora2105
    @davidmora21054 жыл бұрын

    Hi Sr. nice video and well explained, can you add to the timer a 4x4 Keypad to choose the time that I want? and how to do it? I study electronic 20 year ago, so I just started with Arduino, but has been so hard to understand things, I'm not. programming person, so can you help me with that?

  • @jingiskhan8372
    @jingiskhan837211 ай бұрын

    Nice Video! Can i buy a timer like this, which is working with a battery and a button? I just need a countdown going down from 15 minutes each time the button is pressed.

  • @TheFakeyCakeMaker

    @TheFakeyCakeMaker

    5 ай бұрын

    Forget asking anything here. I've been looking for something similar, I wanted to build it and contacted this guy asking him to show a simplified version of this but to be honest he was bit of a wanker so don't expect him to be helpful. You're probably best of getting a digital timer that you can set and goes back to 15:00 when done. Amazon like most things.

  • @jingiskhan8372

    @jingiskhan8372

    5 ай бұрын

    @@TheFakeyCakeMaker Thanks for the help

  • @brianjohnson6305
    @brianjohnson63053 жыл бұрын

    Is it possible to add a tick to this program? The only ones that I have seen use a delay.

  • @brianjohnson6305

    @brianjohnson6305

    3 жыл бұрын

    Never mind I worked it out

  • @cesar120876
    @cesar1208763 жыл бұрын

    Is the wiring and code somewhere?

  • @scjewell1961
    @scjewell19614 жыл бұрын

    The unsigned long variable timeRemaining has to be long. An unsigned long never becomes negative and timeRemaining always remains positive, meaning you can't break out of the countdown loop. This is the answer to the questions below as to how to stop the time.

  • @carlosc.2173
    @carlosc.21735 жыл бұрын

    Just Brilliant...... How do I make a beeper sound when the time is over? some help

  • @zitwaar5469

    @zitwaar5469

    4 жыл бұрын

    buy a 5V buzzer and give it 5V when the timer ends for a second or something.

  • @hannaanjelicaong9719
    @hannaanjelicaong97195 жыл бұрын

    Is the code possible to be used on a 4 digit led strip made clock/timer?

  • @eat-myshorts
    @eat-myshorts3 жыл бұрын

    what the final code?

  • @tyson_gaming1013
    @tyson_gaming10132 жыл бұрын

    How can I start stop and reset it from a node red dashboard

  • @sebaspower9142
    @sebaspower91425 жыл бұрын

    Hi! How can i stop the counter when it is in zero? I try and i cant do it. Thank you.

  • @huldahl123

    @huldahl123

    5 жыл бұрын

    I have the same problem. When the counter gets to zero it starts at 2:47 and counting down. Then at zero it starts at one hour again. Does anyone know how to stop at zero? And also how to stop the counting if something happens. (Read switch or something)

  • @scjewell1961

    @scjewell1961

    4 жыл бұрын

    The unsigned long variable timeRemaining has to be long. An unsigned long never becomes negative and timeRemaining always remains positive, meaning you can't break out of the countdown loop.

  • @mattiabagni2602
    @mattiabagni26023 жыл бұрын

    COULD YOU YOUR CODE PLISSSSSS, I CANT FIND YOUR CODE

  • @robocoderz1644
    @robocoderz16443 жыл бұрын

    the code is not hter in the link also

  • @gangadhars1353
    @gangadhars13534 жыл бұрын

    Hello Sir.. I am new to Arduino, I am planning to do project which will glow the light when the timer reaches 0 and I want this to be done for one your clock which is 31536000 seconds to 0 seconds.. need your input.

  • @andrasparanici5491
    @andrasparanici54913 жыл бұрын

    Hi there! Thank you for the video and the explanation! Some why, my separator is ":" not showing

  • @NoName-sw5ye
    @NoName-sw5ye3 жыл бұрын

    anyone can tell me what "_time_" is?

  • @KennethGomad
    @KennethGomad6 жыл бұрын

    How do you stop the time?

  • @nerikacutie283

    @nerikacutie283

    6 жыл бұрын

    use a pushbutton maybe

  • @nerikacutie283

    @nerikacutie283

    6 жыл бұрын

    to start and end

  • @mohammadsaad8309

    @mohammadsaad8309

    5 жыл бұрын

    Cut the blue wire 😁

  • @adamkiidumae7647
    @adamkiidumae7647 Жыл бұрын

    Nope, the original countdown works, but the adjustments in code for the minute/sec countdown produces no display, although the code did compile - same hardware setup for the 5000 second countrdown

  • @kingbernabe734
    @kingbernabe7343 жыл бұрын

    (SEMICOLON DISPLAY ISSUE ) try '0b01000000' instead of '0x80>>3'

  • @MinePark.

    @MinePark.

    Жыл бұрын

    Thank you very much!

Келесі