Main Content

Simple fine-drawn analog and word CLOCK ON E-PAPER

3.7” E paper shows time synchronized at powerup in the style of an analog clock as well as of the corresponding group of words.

The display which is connected to the ESP32 via SPI Interface, is driven with the GxEPD2 library and the fonts are provided by the U8g2_for_Adafruit_GFX library whose methods work inside the picture loop (paged drawing) of GxEPD2.

The time information is received from a public ntp (network time protocol) server in the setup and then copied to the time structure (struct tm) named timeinfo in updateTime(). Admittedly I have zero knowlegde in programming and thus the synchronization of the time could be programmed much more effectively and smart. I used the strftime function to generate three strings for hour, minute and second and then converted them back to integers. Once at start the number of seconds at this moment is then subtracted from the minute the clock normally waits until it updates the time to the next minute and refreshes the display. This means assuming the time is exactly 11:11:50 the clock will only wait 10 seconds and then switches to the next minute.”

Link to article