Build an ESP8266 NTP clock β€” parts and pitfalls

Four parts, four wires, and the three things that waste an evening if nobody warns you.

Wire the display

Safety: Both boards run at 3.3 V. Feeding 5 V to the OLED’s logic pins is the commonest way to destroy one. SDA to D2, SCL to D1 on a Wemos D1 mini, plus 3V3 and GND. Four wires and no soldering if both boards have headers.

Find the display address

SSD1306 modules ship as 0x3C or 0x3D and the silkscreen is often wrong. Run an IΒ²C scanner first β€” a blank screen with correct wiring is almost always this.

Flash the firmware

Board manager URL for the ESP8266 core, pick your board, and upload over USB. Some clones need the CH340 driver before the port appears at all.

Set the timezone properly

Use a POSIX TZ string rather than a fixed offset, so daylight saving is handled for you. A hardcoded +1 is correct for half the year, which is the worst kind of wrong.

Handle the network being absent

Decide what the clock shows before NTP has answered and when Wi-Fi drops. A clock confidently displaying 00:00 is worse than one that says it does not know.

Where this comes from

Espressif ESP8266EX datasheet; RFC 5905 β€” Network Time Protocol version 4. Every stage above is marked with how confident we are in it, and an uncertain one says so rather than reading like the rest.

Questions

How is esp8266 network clock made?

A Wi-Fi clock that sets itself from the internet: a microcontroller, a small display, and a power supply that is already safe. The stages above set it out at the maker level.

Can I build this myself?

Yes β€” the bill of materials lists 4 parts and roughly what they cost. Anything on the refusal list is not here at any depth.