Over at Sparkfun, [Alex] shared an OLED clock project that’s currently in progress but has a couple interesting twists. The first is the use of a small OLED screen for each digit, to which [Alex] added a stylistic touch. Digits transition by having segments slide vertically in a smooth animated motion. It’s an attractive effect, and the code is available on his github repository for anyone who wants to try it out.
[Alex] also found that by using an ESP32 microcontroller and synchronizing the clock via NTP over WiFi, the added cost of implementing a real-time clock in hardware becomes unnecessary. Without an RTC, time would drift by a few seconds every day and require a reset. At the moment the clock requires the SSID and password to be hardcoded, but [Alex] would prefer to allow this to be configured via a web page and could use some help. If you have implemented a web server on the ESP32, [Alex] would like to know how you handled multiple pages. “I’ve been scratching my head throughout the build on how to get this done,” he writes. “With the ESP8266, there’s on(const String &uri, handler function)
, but that seems to have been removed on the ESP32.” If you can point [Alex] in the right direction, be sure to pipe up.
OLED displays and clocks often go together, as we have seen with projects like the DIY OLED Smart Watch, but it’s nice to see someone using the OLED’s strengths to add some visual flair to an otherwise plain display.
It’s not that difficult. See e.g. https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/SimpleWiFiServer/SimpleWiFiServer.ino — just compare the ‘currentLine’ – variable to e.g. “GET /anotherpage.html” or whatever and then write the reply to the client accordingly.
try micropython on the esp32 – seems like the wifi stack is well enough exposed now
Even a RTC with a crystal has a few seconds drift per day… depense on the quality of the crystal
Awesome!!! You can literally see the time flowing. It would be wonderful to see a decimal time clock using such displays.
Or for literally, literally seeing the time flowing…
https://st.hzcdn.com/simgs/8cb1cde3051da795_4-2850/traditional-decorative-objects-and-figurines.jpg
OLED displays are a poor choice for clicks — after a while, the digits will burn into the displays.
By that time you will have built more new clocks. It does not matter.
Which takes years, I can tell from the Ultimaker2 machines at our office (at ultimaker HQ) a few of them have burned in screens, all of those have been on for years. And none of them are really bad that it becomes unreadable.
Those are also always at 100% brightness, lowering the brightness/contrast value would most likely increase the time till burnin.
What if you do some wear leveling in code that inverts the display for an equal amount of time each day?
Or you could get a big screen and re-implement the windows screensaver clock with the time bouncing around.
To configure the wifi over a web page, just add the following library, and a couple of lines of code :)
https://github.com/tzapu/WiFiManager
Actually You might need this one for the ESP32
https://github.com/zhouhan0126/WIFIMANAGER-ESP32
This is a nice, pleasing idea.
Very creative! Love it!
That’s a cool effect.
Looks prety sweet :) Takes me back to my first alarm clock, though this looks like way less of a fire hazard than that thing lol.
Anyone interested in a PAID PROJECT to build similar clock with larger digits to be used as a multi-region clock for a company?
In our case we’d like to have 4 of these to display time in 4 countries. We can fabricate the enclosure to house. DST support would be nice to have. If if can be modified to also include day and date like Monday Feb 2, 2019, it would be the perfect clock.
I am interested. Can I get more info? I have experience with similar projects.
Feel free to contact me by phone, just add .com to my user name and click the Contact Us page for my number.