magnifier
Language
  • English
  • German
Currency

News

DIY ESP32 Clock Kit: NTP Time, Live News Ticker & On-This-Day History on a 0.96" OLED

0 comments /

DIY ESP32 Clock Kit: NTP Time, Live News Ticker & On-This-Day History on a 0.96" OLED



Looking for a desk clock that does more than just tell time? Our new ESP32 DIY Clock Kit packs a Wi-Fi-synced analog and digital clock, a live news ticker from major world outlets, and a daily "on this day in history" card — all on a tiny 0.96-inch OLED display. It's the perfect weekend build for makers, students, and anyone learning electronics or embedded programming. Get Parts: esp32 + 0.96 Oled I2C










Step 1 — Wire the OLED to the ESP32

Only four wires needed. Power the display from the ESP32's 3.3V rail (not 5V — it will work, but 3.3V is safer on this screen) and connect the two I²C data lines to GPIO 8 and 9.

OLED Pin ESP32 Pin Purpose
VCC 3.3V Power
GND GND Ground
SDA GPIO 8 I²C data
SCL GPIO 9 I²C clock

Note: if you're using a different ESP32 board that doesn't expose GPIO 8 and 9, you can change the pin assignment in the sketch (see Step 4 below).

Step 2 — Install the Arduino IDE and ESP32 Board Support

  1. Download and install the latest Arduino IDE from arduino.cc.
  2. Open File → Preferences and paste this URL into the "Additional Board Manager URLs" field:
    https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  3. Open Tools → Board → Boards Manager, search for esp32, and install "esp32 by Espressif Systems".
  4. Under Tools → Board, select the ESP32 variant that matches the board in your kit (e.g. "ESP32C3 Dev Module" or "ESP32 Dev Module").

Step 3 — Install the Required Libraries

Open Tools → Manage Libraries and install these two (the ESP32 core includes everything else):

  • Adafruit GFX Library — by Adafruit
  • Adafruit SSD1306 — by Adafruit

Everything else used by the sketch — WiFi, HTTPClient, WiFiClientSecure, Wire, time.h, and FreeRTOS — comes bundled with the ESP32 core. No extra installs needed.

Step 4 — Download the Firmware and Edit Three Lines

Download both sketch files (clock-ntp-rss-366-events.ino and history_events.h) and place them in a folder named clock-ntp-rss-366-events. Open the .ino file in the Arduino IDE.

Near the top of the sketch you'll see a USER SETTINGS block. Change these three lines to match your Wi-Fi and time zone:

That's it. Three edits and you're ready to flash. If your board uses different I²C pins, you'll also find this block a bit further down — change the numbers to whatever your ESP32 exposes:

Step 5 — Flash and Enjoy Get Parts: esp32 + 0.96 Oled I2C

Plug the ESP32 into your computer with the USB cable, select the correct COM / serial port under Tools → Port, and click the Upload arrow. After a few seconds you'll see the OLED come to life: first "Connecting Wi-Fi", then "Syncing NTP", and finally the analog + digital clock face with the news ticker scrolling along the bottom.



A Peek Inside the Code

The sketch runs three cooperative loops on the ESP32 using FreeRTOS tasks, so the display never stutters — even while a news fetch is in flight. Every day of the year gets its own historical event from a lookup table. Here's a small slice:

Make It Your Own

Because the firmware is open and well-commented, you can easily:

  • Swap in your favorite RSS feeds (sports, tech, local news) in the feeds[] array
  • Add your own historical events to history_events.h
  • Change the refresh interval, scroll speed, or card dwell time
  • Re-skin the clock face, or add a weather or crypto-price panel

Get Yours

Grab the ESP32 + 0.96" OLED DIY Clock Kit from our store and have a working internet-connected clock on your desk this weekend. Whether you're a hobbyist, a STEM teacher, or just someone who wants a smarter clock, this kit is a fun, educational, and genuinely useful build.

👉 Shop ESP32 DIY Kits at eelectronicparts.com

clock-ntp-rss-366-events

history_events.h

Wiring is just four pins: VCC, GND, SDA, and SCL. If you can plug in a USB cable, you can build this clock.

Features at a Glance

  • NTP time sync over Wi-Fi using pool.ntp.org — accurate to the second, automatic daylight saving
  • Four US time zones supported out of the box: Eastern, Central, Mountain, Pacific
  • Analog + digital face on a single screen, with a moving "seconds bead" around the dial
  • Scrolling RSS news ticker pulling headlines from BBC, NPR, and Al Jazeera (refreshes every 15 minutes)
  • Source badges so you know who wrote each headline at a glance
  • Wi-Fi signal indicator with live RSSI bars
  • "On This Day" history cards — a different historical event for every single day of the year, all 366 days covered
  • Polished UI touches: 1-pixel border, fetch-success blink, smooth scroll

How the Code Works (the Short Version)

The sketch is built around three loops working together on the ESP32:

Time loop. On boot, the ESP32 connects to your Wi-Fi, syncs with an NTP server, and then runs a software clock locally. The analog hands and digital readout update from the same time source, so they never drift apart.

News loop. Every 15 minutes, a background task fetches RSS feeds over HTTPS, parses the XML, decodes HTML entities, and queues fresh headlines into a scroll buffer. The ticker keeps moving smoothly the whole time — no stutter while fetching.

History loop. A lookup table (history_events.h) maps every day of the year to one or more notable events. The clock rotates between the news ticker and a full-screen history card every 20 seconds so you always have something new to read.

All three run cooperatively using FreeRTOS tasks, so the display never freezes — even mid-fetch.

Why ESP32 + OLED?

The ESP32 is hands-down the best beginner-friendly Wi-Fi microcontroller on the market: cheap, well-documented, and supported in the Arduino IDE. Pair it with a crisp 0.96" SSD1306 OLED and you have a platform that can drive dashboards, IoT widgets, weather stations, smart-home displays — anything you can dream up. This clock is a great first project that teaches you Wi-Fi, NTP, HTTPS requests, RSS parsing, graphics, and FreeRTOS tasks all in one tidy sketch.

Make It Your Own

Because the firmware is open and well-commented, you can:

  • Swap in your favorite RSS feeds (sports, tech, local news)
  • Add your own historical events to the lookup table
  • Change colors of the inverted text badges
  • Re-skin the clock face, or add a weather panel


Get Yours:

esp32 + 0.96 Oled I2CEsp32-S3 Development board ESP32 SuperMini development board WiFi Bluetooth - eElectronicParts



Grab the ESP32 + 0.96" OLED DIY Clock Kit from our store and have a working internet-connected clock on your desk this weekend. Whether you're a hobbyist, a STEM teacher, or just someone who wants a smarter clock, this kit is a fun, educational, and genuinely useful build.


👉 Shop ESP32 DIY Kits at eelectronicparts.com


0 comments

Leave a comment

All blog comments are checked prior to publishing

You have successfully subscribed!