Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:38 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Some New Clock Programs

Author Message
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 393
Posted: 09:39pm 17 Oct 2023
Copy link to clipboard 
Print this post

In the past, I have published several clock programs, including GrandfatherClock, BCDClock, SpinClock, and others. Here are 3 additional CMM2 clock programs for your amusement or ignoring .

GridClock was inspired by the kinetic art piece "Humans Since 1982: A Million Times 120" by Kevin Gittemeier.

The clock consists of 120 small clocks layed out in a 15x8 grid. The hands of all these small clocks rotate to various positions to create graphic patterns, and once a minute, the 24-hour time.







GridClock.zip

The other two clocks are less fancy. WordClock gives the date, time, and day of the week in large text. It incorporates a perpetual calendar to compute the day of the week.

DigitalClock shows the time in large simulated 7-segment displays.


WordClock.zip


DigitalClock.zip
Edited 2023-10-18 08:24 by William Leue
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 02:24pm 18 Oct 2023
Copy link to clipboard 
Print this post

I love 🕰
Plasma
 
NPHighview

Senior Member

Joined: 02/09/2020
Location: United States
Posts: 200
Posted: 04:05pm 18 Oct 2023
Copy link to clipboard 
Print this post

William: I absolutely love that style of clock display, and I will scrutinize your code to see how you accomplished it :-)

If you're using a PicoW, you may like this code: https://github.com/sfjohnso/PicoW/blob/main/AnalogClock.bas

This uses the Waveshare Pico-Eval-Board but could easily be adapted for other displays by modifying the CONST values at the beginning. It uses the P-E-B's on-board "clicker" to quietly, but audibly, tick every second. This clicker isn't on any other Waveshare board that I've found.

You need to set up access to your WiFi via OPTION command, and set the display to Portrait (I use Portrait-Reversed to make the USB cable come out close to the desktop). In the code, you may need to hard-code the time-zone offset from Universal Coordinated Time (it's currently set to work for me near Los Angeles).

If it doesn't find your access point or an NTP server (to begin with, and once per hour), it'll use locally-set (i.e. via command line) time and date, and indicate (using a stick figure) that time is manual. If it's successful in picking up NTP, then it displays a "computer" figure.

The clock face is my crude attempt to emulate Swiss railroad clocks, but show a "ticking" second hand instead of a sweep second hand. You can change hand lengths and colors by modifying the CONST values.
Edited 2023-10-19 03:38 by NPHighview
Live in the Future. It's Just Starting Now!
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 393
Posted: 08:28pm 18 Oct 2023
Copy link to clipboard 
Print this post

Thanks for the kind words, Plasmamac and NPHighview!

-Bill
 
NPHighview

Senior Member

Joined: 02/09/2020
Location: United States
Posts: 200
Posted: 09:43pm 19 Oct 2023
Copy link to clipboard 
Print this post

Bill: Looking through the code - this for the CMM2, I see. Maybe I can manage to port it to Pico one a 480x320 display :-)
Edited 2023-10-20 11:21 by NPHighview
Live in the Future. It's Just Starting Now!
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 396
Posted: 03:25pm 20 Oct 2023
Copy link to clipboard 
Print this post

Would be cool if this would run on the PicoVGA :)

Really nice work!

Greetings
Daniel
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 07:03pm 20 Oct 2023
Copy link to clipboard 
Print this post

Here is a similar clock, for the pico, does use less clocks, there is also a VGA version.
ClockClock24
Edited 2023-10-21 06:52 by Bleep
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024