NodeMCU Amica Pin Adafruit 1.8” Display Connections
Information about NTP can be found all over the
Internet. See www.ntp.org for detailed information.
Information about time zones can be found at
Information about programming the ESP8266 in the
Arduino environment can be found at
github.com/esp8266/Arduino and also in my articles
Information about the NodeMCU Amica can be found
Information about the Adafruit 1.8” TFT SPI LCD display
can be found at www.adafruit.com/products/358.
Main program which initializes the
hardware for operation and runs a
finite state machine that insures
the Wi-Fi connection to the Internet
is continually maintained.
Information about the SainSmart display can be found
Code for formatting and displaying
time and date information on the
LCD, and a finite state machine
that controls the order that time
zones are displayed in; which time
zone is currently being displayed;
and how long each time zone is
The ST7735 display driver library can be found at
The Time library can be found at
The Timezone library can be found at
Time Change Rules (described
shortly) for each time zone are also
defined in this file, and the
conversion of NTP’s UTC time to
local time,zone time is perform
here as well.
Lindley_ESP8266WorldClock.zip. To use this software,
unzip the file and copy/move the ESP8266WorldClock
directory into your computer’s Arduino directory. The
zip file also contains the versions of the libraries I used
during program development.
Functions for sending UDP packets
to NTP servers on the Internet and
retrieving the returned UTC time.
TextGraphicsFunctions.h Misc. functions for formatting text data for display on the LCD.
A subclass of the Timezone class
that contains the Time Change
Rules in addition to a name
assigned to the time zone.
It is important to use these versions as newer or
older versions may not function correctly. The library zip
files should be unzipped as well, and then moved into
your Arduino/Libraries directory for use. Remember the
Arduino IDE — if running — must be restarted to
recognize new libraries after you install them.
Whereas the hardware for this world clock borders
on the trivial, the software/firmware for the clock is a bit
more involved and complex. The files which make up
the program are described in Table 2. In addition
to the files listed in Table 2, the Arduino libraries
shown in Table 3 are also required.
of the World Clock
sidebar for how to set up the Arduino IDE on your
computer for targeting ESP8266 type devices. Make sure
to select “NodeMCU 1.0 (ESP-12E Module)” as the board
type in the Tools menu.
The world clock’s software must be configured before
the clock will operate correctly. All user configuration
items are found in the file ESP8266WorldClock.ino. Please
locate the following text in that file:
The ESP8266 world clock software is available at the
article link; the file is called
// Begin user configurable items
32 July 2017