Introduction: ESP8266 Weather Station Clock

This project is a nice way of displaying the time and weather in a small convenient package. I will explain the project, how it works and show the code here.

You can press different buttons to show the current weather in a set location as well as temperature and pressure. The default view is the time which is pulled from an NTP server.

There is no need to set the time as the time is synchronised from the NTP server and is very accurate. In this configuration I have the time and the local IP address. You can change the code to include date, weather, pressure and temperature to display on the main screen or on the buttons.

Step 1: The Schematic

The schematic is relatively straightforward and easy to

follow. There is a gerber file if you wish to spin your own PCB. The whole circuit is driven by 5V coming from a micro USB connection. This makes the circuit simple and easy to power. The 5V is fed into a Low Dropout 3.3V Regulator an LM 3940 which gives 3.3V to the ESP8266. There is a USB connector on the ESP8266 however, I chose not to use it in general because the 5V is driving the LCD too.

3.3V must be used with the ESP8266, you can’t drive it directly with 5V as it will kill the board.

The two tactile switches are connected to D5 and D6 and are configured in the code to bring up different information on the screen. I have these set to Temperature/Pressure and Forecast.

All the components are easily hand soldered onto perfboard or the gerber is available in my GitHub at

Step 2: The Code

The code is compiled in the Arduino IDE and needs some configuration to work

Firstly, you need to install the ESP8266 Board to the IDE in order to upload code to it.

Comprehensive instructions on how to do this are here:

To get the weather functionality, I chose to use RemoteMe which collects the weather data direct from API and generates code which can be inserted into your code. You will need to register and set up the data stream on their website:

Documentation about RemoteMe can be found here:

There are some specific definitions that are unique to your setup that you will need to complete before upload:



#define DEVICE_ID 1



The definitions here need to be set by you based on your wifi details and the token you get from RemoteMe.

You need to make sure all these libraries are installed and included in the code. I have included links to the ones that are more difficult to get.

#include //





The last part that needs changing is your location as this project does not use GPS. You need to modify the “LOCATION” string:

else if(buttonState2 == LOW && prevButtonState2== HIGH){









prevButtonState2 = buttonState2;

Step 3: The Build

The Build

At the time I did not have access to a 3d printer, this was my last project using an off the shelf case. I used a readily available alarm panel case which is designed for the 16x2 LCD.


Everything is stuffed inside the case, the 16x2 LCD display is glued to the front panel with the circuit board hot-glued in place.

Step 4: Conclusion


This is a neat project for a desktop digital clock that needs no adjustment or setting, it takes the time from an NTP server and displays it on a clear backlit LCD.

This is not for a complete beginner as there is some configuration to the code required and data streams need to be set up too. If you have any questions or comments, please feel free to leave me a comment.

Anything Goes Contest

Participated in the
Anything Goes Contest