Best tactic: count down clock

For general Flowcode discussion that does not belong in the other sections.
MJU20
Posts: 353
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 101 times
Been thanked: 70 times

Flowcode v9 Best tactic: count down clock

Post by MJU20 »

I need advice..

I want to make a count down clock, that counts backwards to a date in the future (years).
I want to set a certain date (year/month/day) that the clock count to and shows the remaining years/months/days/hours/minutes on a display.

What is the best tactic to do so?
My first idea was to calculate datestamps (like in a format that is used in Excel) and use these to calculate the difference back to years/months....

The other idea was to search for website on the internet that calculates this for me (Days Between Dates Calculator), and to try and filter the result form a query.
If this should work I would send the data ones a day and use the result to count down only for that day.

I want advice on how you smart guys would start on a project like this. :P
Do you have other brilliant ideas on how to get this working?

chipfryer27
Valued Contributor
Posts: 1688
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Best tactic: count down clock

Post by chipfryer27 »

Hi

Best advice I can give if you see a "countdown timer" is to run........... :lol:

Unix / linux systems use the Unix Epoch whereby every second is counted from midnight 1/1/1970 so any time from then until future is easily calculated (if you are a computer).

This link may prove useful as it has calculators and examples of code.

https://www.epochconverter.com/


Regards

EDIT
Thinking on it, there's probably a site somewhere that you could "query" and get a reply with your answer, perhaps using "GET" or such like.

Another EDIT
There is.... https://www.timeanddate.com/countdown/create appears to let you create a timer and then share the countdown via a URL. You may be able to manually setup your countdown then just use the URL to get the result. I haven't looked into it yet but there seems to be plenty of options open to you.

MJU20
Posts: 353
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 101 times
Been thanked: 70 times

Re: Best tactic: count down clock

Post by MJU20 »

Thank you Chipfryer,

This seems very promising.

An example:

Code: Select all

https://www.timeanddate.com/counters/fullscreen.html?mode=m&iso=20260201T015153&year=2026&month=2&day=1&hour=1&min=51&sec=53&p0=48
returns something I can read....

Other suggestions are still welcome.

chipfryer27
Valued Contributor
Posts: 1688
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Best tactic: count down clock

Post by chipfryer27 »

Hi

I hope you are going to display the countdown using exposed 7-segment LEDs as per "Hollywood ” :)

Regards

MJU20
Posts: 353
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 101 times
Been thanked: 70 times

Re: Best tactic: count down clock

Post by MJU20 »

chipfryer27 wrote:
Thu Mar 23, 2023 6:52 am
Hi

I hope you are going to display the countdown using exposed 7-segment LEDs as per "Hollywood ” :)

Regards
A bit like this:

Image

Most of the time I make stuff that works for a while, and when I'm sure that it works, I disassemble it :-(

BTW: thank you Chipfryer

WingNut
Posts: 270
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 41 times
Been thanked: 29 times

Re: Best tactic: count down clock

Post by WingNut »

You're building a time machine aren't you.

chipfryer27
Valued Contributor
Posts: 1688
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Best tactic: count down clock

Post by chipfryer27 »

Hi

I was just about to say the same, how did you know...????

I love LED displays (possibly an age thing) but they are so power hungry compared to LCD.

Girlfriend had broken the little timer used when cooking. I'm sure you know the type of thing, set a countdown time in minutes and it beeps when elapsed.

Rather than spending £4 on a new one I decided to build one using the 7-Segment displays I have kicking around. When Maplin was still a shop they did component packs, which were more like "lucky dip". Each display pack had 2 x 16 LCD's, various 7-Segment displays and a ton of other stuff but never the same pack twice. Still have more 7-Segments than I'll probably ever use..

Anyway with the help of FC (v5 or v6) I made a countdown timer to assist when cooking and it had dual times, which I thought would earn me bonus points. One set red the other green (with a decimal point flashing every second on the red, but every half second on the green, just coz I could). However I made it up on matrix board, with exaggerated connecting wires so that it resembled something out of "Hollywood's" typical depiction of any explosive device.

LED displays consume power so D-cells were used to supply, but arranged to look like dynamite (the curly red and black leads only added to the effect).

When she used it for the first time she commented that it looked like "something off an atom bomb". I was pretty happy about that. However that was short lived as dinner ended up a bit overcooked....... Timers did actually countdown, but I'd forgotten to solder in the beeper that would sound the alert.

I'm sure you can imagine the rest..... then things took a further downward turn. Replying to "what kind of idiot builds a timer without a beeper", my reply of "coz it's authentic" cut little slack. My reasoning of "If it did countdown to set off a thermonuclear blast as you suggest, then you would never hear that either...."

Cold shoulder for dinner, breakfast and lunch........

I hope you have more luck :)

Regards

WingNut
Posts: 270
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 41 times
Been thanked: 29 times

Re: Best tactic: count down clock

Post by WingNut »

I've a load of them, bought as a lot from ebay. Seemed like a good idea at the time but I've never used any but I kind of like the idea now of building a timer that looks like sticks of dynamite with 7 seg display. Or even a desk clock! I work at an airport that one would go down a treat (or with a bang)

chipfryer27
Valued Contributor
Posts: 1688
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Best tactic: count down clock

Post by chipfryer27 »

Hi

I think MJU20 may have inadvertently started something (ticking..??).

I'm going to wait until he figures his countdown out (he's good at sharing), then just build something similar that counts down to whenever. Perhaps a bomb like look, or a "Doc Brown" with Dynatape. It may even create a sound at certain times during the countdown.

Once triggered, I will no doubt be asked what it's counting down to, but will simply reply "Don't you know...." which can be further embellished with "have you forgotten..?" or "that''s upsetting..!" especially handy if girlfriend is asking.....:)

Hope she doesn't read these forums.....

Regards

MJU20
Posts: 353
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 101 times
Been thanked: 70 times

Re: Best tactic: count down clock

Post by MJU20 »

Hold your horses :-)
No problem sharing my projects, but I don't always have the time (no, that is not why I want to make a count-down clock).

For me it is more important that I know that something I've made, works en does the trick. May times I dismantle it after a while because I need a part of that project.

And please, share your projects too (with or without buzzer) :)

Post Reply