Retro Style OLED Clock Sync Over WiFi
by plouc68000 in Circuits > Arduino
2074 Views, 28 Favorites, 0 Comments
Retro Style OLED Clock Sync Over WiFi
Beautiful retro looking digits with modern OLED tech. The time / date is self adjusted over your WiFi connection to the Internet.
After playing with my ESP-12E Module and reading the Internet Time via NTP-Client, I got the Idea to make a nice OLED Clock with it, using the Special 7-Segment Character Set I designed previously for the Didel 1306 Graphic Library.
I had also to adapt the Didel Library so its working now with wire.h, so it works not only on UNO or MEGA, but also on ESP8266, STM32 and others. The Clock gets the Time over your Wifi at startup, and then every day once get synched around midnight in order to minimize data and power consumption.
Supplies
ESP8266 ESP12-E
1306 OLED 128 x 64
Breadboard
Jumper wires
Wiring Instructions
Connection Plan is quite simpe, only 4 wires to the I2C OLED
From OLED pins to ESP-12 Pins :
-GND to G
-Vcc to 3V
-SCL to D1
-SDA to D2
Download the Code, Edit Your Home WiFi Settings in the Code and Upload to ESP8266
Download the code to your Arduino IDE, select the Board ESP-12E Node MCU 1.0
ATTENTION : You must edit in the Code the Network Credentials so it connects to your WiFi !
The Code you find here:
https://create.arduino.cc/editor/plouc68000/94a05f...
// ToDo before uploading the software to your ESP8266 target
// 1) Replace with your network credentials
const char* ssid = "Put your SSID here";
const char* password = "and the WiFi Password here";
// 2) Set the right Time-zone
// Set offset time in seconds to adjust for your timezone, for example:
// GMT +1 = 3600 // Europe
// GMT +8 = 28800
// GMT -1 = -3600
// GMT 0 = 0
const int TZ=3600;