esp8266 tft lcd weather station made in china

In the previous article (“WiFi OLED Mini Weather Station with ESP8266“) I have used the OLED kit from https://blog.squix.org. And as promised, this time it is about the “ESP8266 WiFi Color Display Kit”:

I had ordered both because I thought that the Color Display kit is needs the other kit as a base. Well, it turned out that both kits work independently. My bad. Actually this is good, as I have now two independent ESP8266 weather stations :-). An addition to that, they can exchange data (e.g. temperature/humidity) with a server, so that makes them a perfect dual weather station.

Example code is available on GitHub (https://github.com/squix78/esp8266-weather-station-color). The code is very well documented I had no issues to make all the needed configuration (WiFi SSID and connection settings). After a few  hours I had the ESP8266 weather station up and running in the first prototype of the enclosure:

After a few hours, I have now my second ESP8266 WiFi weather station with touch LCD. It is not looking good and I very much enjoy it. The design is available on Thingiverse (https://www.thingiverse.com/thing:2527282).

esp8266 tft lcd weather station made in china

Nice packaging comes with more tham you need to build your weather station. Only thing that was missing was a piece of paper with reference to documentation, which is to be found on the Internets.

What you’ll build in less that 20 minutes of soldering is a device, that (with demo sketch for Arduino IDE) is able to connect to your WiFi and fetch current WeatherStation data for pre-defined location. On first start, it will require to calibrate touch display used to control the device.

Even though it might not be visible at first sight, there’s a tremendous amount of work behind this thing (and by ‘thing’ is meant a combination of software and hardware). When you start installing the sample Weather Station sketch, it appears that you need to install some libraries, all of them by Daniel Eichhorn: ESP8266 WeatherStation which is a WeatherUnderground client, Json Streaming Parser that helps keeping low memory profile while getting huge API responses, and Mini Grafx library that implements a VSYNC equivalent through framebuffer for embedded devices.

esp8266 tft lcd weather station made in china

Welcome to my new Weather Widget Project. Earlier I have posted an article on the weather widget, that uses a 0.96" OLED display to display the weather parameters. The main problem in the earlier version is that the display is very small in size, so you have to come very close to it for reading the parameters. That"s why it was always in my mind to upgrade it to a larger color display with a nice 3D printed enclosure.

In this post, I will show you how to make a Weather Widget by using ESP8266 and a 2.8" touch screen display. The device retrieves localized weather information from https://openweathermap.org/ by WLAN and displays it on the Display module.

I would like to give credit to my friend Dani Eichhorn who did all of the programming parts. He is updating the software on his Github page regularly with new features. You can visit SquixTechBlog to see more projects on ESP8266.

My plan is to place the weather display circuit inside a 3D-printed enclosure. But the enclosure that I am going to use is very compact, and there is little room to keep the Wemos board along with the connecting wires inside the housing.

The wiring diagram is very straightforward. You have to connect the TFT display module ( ILI9341 ) pins with Wemos pins as per the schematic diagram. The schematic diagram is shown above. You may also follow the following pin mapping

2. Enterhttps://arduino.esp8266.com/stable/package_esp8266com_index.json into the File>Preferences>Additional Boards Manager URLs field of the Arduino IDE. You can add multiple URLs, separating them with commas.

After setting up Arduino IDE and installing all the libraries we can move to upload the code into the ESP8266 board ( Wemos D1 Mini Pro or any other board )

First, you have to unzip the code downloaded in the earlier step and then save it somewhere on your PC or Laptop. Remove the word master from the folder name, the final name shall be " esp8266-weather-station-color "

In one of the tabs, the IDE opened settings.h. Go through the file and adjust the two handfuls of configuration parameters. They are all documented inside the file directly. Everything should be self-explanatory. Most importantly you will need to set the OpenWeatherMap API key you obtained in a previous step.

If you are successfully uploaded the code into the ESP8266, you will immediately notice the display on the front page by searching the WiFi Network for connection. After connecting the device to your WiFi router, it will update the time and weather data from the web.

Now you will be able to see all the weather information along with all other parameters on the TFT display. You can swap between the different pages by using the stylus or touching with your finger.

esp8266 tft lcd weather station made in china

I started working on the ESP8266 WiFi Color Kit‘s touch interface for the WeatherStation Color. I added a few more screens and a touch screen calibration during start up.

It’s been a while since my last post, but I have been working hard on improving the WeatherStation Color. Read here the engineering challenges I had to overcome and how I solved them

Ever since the launch of the ESP8266 Weather Station in the US Amazon store I had to ship two different versions of this product. The customized box containing the Weather Station with the NodeMCU, a OLED display, a DHT11 and some cables was only available through …

In this post I’d like to show you some of the projects that other people did based on my WeatherStation library. I hope this will inspire you to get creative and extend the code with you features. Or maybe you have built a nice case …

More than two months ago I started the process to have my ESP8266 WeatherStation listed on Amazon. The big online platform offers a service called Fulfilled by Amazon or short FBA which allows you to send your items directly to their warehouse. Your product will …

If you don’t mind code which is a little bit rough around the edges you can start experimenting with the code for the color weather station. I just published it on Github. You  can find it here: https://github.com/squix78/esp8266-weather-station-color

As first task for the upcoming Weather Station Color project I wanted to adapt my online font generator. Easily creating fonts in various sizes will make work on the Weather Station code a lot easier. Since my own display library doesn’t support the color TFT …

Yesterday I started playing around with a TFT color display connected to the ESP8266. First I adapted example code to download BMP files to the flash memory, and boy, this display has some nice intense colors!

I received a few complaints that users couldn’t get the Platformio IDE running since the security software detected it as malicious software. So I added the code also to the WeatherStation library as a demo project.

I have been working on a new demo of the Weather Station which is built as a platformio project. It has a few features which are not in the library demo: Wifi Signal Quality icon in overlay Weather Icon, temperature and time in overlay By …

esp8266 tft lcd weather station made in china

As you all know the are a few variants of the 1.8" TFT on the internet. With the genuine Adafruit lcd-s there are usually no problems. But when using fake ones(usually from Aliexpress) you have to make some adjustments.

Bodmers TFT_eSPI library is very awsome and rich funcionality. And the best part is that he made it to handle the pixel offsets depending on wich kind of 1.8" TFT you are using.

Then uncomment the tft height an width. And then in my case(REDTAB) uncomment for eg: #define ST7735_REDTAB. After this save it for the moment and compile sketch and upload to board. To be sure i have defined the parameters in the sketch too.This is a bit long procedure, cause you have to compile and upload the sketch every time to board untill the offset is gone, but it is worth the experimenting. For editing the h. files i strongly suggest Wordpad. Images included.

esp8266 tft lcd weather station made in china

ILI9341 is a 262,144-color single-chip SOC driver for a-TFT liquid crystal display with resolution of 240RGBx320 dots, comprising a 720-channel source driver, a 320-channel gate driver, 172,800 bytes GRAM for graphic display data of 240RGBx320 dots, and power supply circuit. ILI9341 supports parallel 8-/9-/16-/18-bit data bus MCU interface, 6-/16-/18-bit data bus RGB interface and 3-/4-line serial peripheral interface (SPI). The moving picture area can be specified in internal GRAM by window address function. The specified window area can be updated selectively, so that moving picture can be displayed simultaneously independent of still picture area.

You can find ILI9341-based TFT displays in various sizes on eBay and Aliexpress. The one I chose for this tutorial is 2.2″ length along the diagonal, 240×320 pixels resolution, supports SPI interface, and can be purchased for less than $10.

Note that we will be using the hardware SPI module of the ESP8266 to drive the TFT LCD. The SPI communication pins are multiplexed with I/O pins D5 (SCK), D6 (MISO), and D7 (MOSI). The chip select (CS) and Data/Command (DC) signal lines are configurable through software.

For ILI9341-based TFT displays, there are some options for choosing the library for your application. The most common one is using Bodmer. We will use this library in this tutorial. So go ahead and download the

The library contains proportional fonts, different sizes can be enabled/disabled at compile time to optimise the use of FLASH memory. The library has been tested with the NodeMCU (ESP8266 based).

The library is based on the Adafruit GFX and Adafruit ILI9341 libraries and the aim is to retain compatibility. Significant additions have been made to the library to boost the speed for ESP8266 processors (it is typically 3 to 10 times faster) and to add new features. The new graphics functions include different size proportional fonts and formatting features. There are a significant number of example sketches to demonstrate the different features.

Configuration of the library font selections, pins used to interface with the TFT and other features is made by editting the User_Setup.h file in the library folder. Fonts and features can easily be disabled by commenting out lines.

Now you are all set to try out tons of really cool built-in examples that come with the library. The following output corresponds to the TFT_Pie_Chart example.

My favorite example is TFT terminal, which implements a simple “Arduino IDE Serial Monitor” like serial receive terminal for monitoring debugging messages from another Arduino or ESP8266 board.

esp8266 tft lcd weather station made in china

ESP8266 Programming: today we’re going to build something exciting together and you guessed right – it has to do with the Internet of Things (IoT).  As we do more and more IoT business for our clients we, as software developers, also get more and more into the hardware part of the equation. It’s an important part when you truly want to understand and solve a problem.

To achieve this and to share my knowledge with you in the best possible way, I made a project that will help illuminate what’s behind IoT and how to make IoT hardware. You don’t need much hardware to follow along, here’s what you need:An ESP8266 Board. I use and recommend a NodeMCU Dev Board: $2-5 from China, $8 Amazon

To start off we’re going to build an easy temperature + humidity sensor station similar to what my colleague Bryan built with an Arduino. Once that is done, the plan is to extend our software by adding MQTT as a communication protocol. Finally, we want to integrate all of that with an Amazon Alexa Skill – both with a traditional JSON interface and the MQTT interface so we can clearly see the implementation differences.

In this part of the ESP8266 programming series, we’re going to attach our temperature and humidity sensor to our ESP8266 module and make the data available over WiFi and HTTP. Before we can do that, let’s understand what hardware we have here.

The module in question here is a NodeMCU v2 Board. The version 2 of this board utilizes a ESP8266 12E WiFi chip. The ESP8266 12E is, as are all the ESP chips in this series, a low-cost WiFi chip that comes with either an 80 or 160 MHz CPU and 64/96 KiB memory for instructions and data. Per design, these chips have at least 16 GPIO pins and most of them feature an integrated antenna traced on the PCB. The 12E version, I will be using also features 20 GPIO pins and a 4MB Flash.

Tools -> Boards:... -> Boards Manager ... -> Filter: ESP8266. From there, the IDE should filter your search results down to one entry “esp8266 by ESP8266 Community”. Click on that field and click on “Install”. Now you are able to select your NodeMCU module from the Tools section in the Arduino IDE and set the port and baud you’re using. CPU and Flash Size can be left as the IDE suggests it in most cases, Baud will most likely be 115200.

Now that everything is wired, we can go on to program the ESP8266 to read and provide the DHT11’s data as JSON and text over HTTP. We’re going to use 4 different libraries for that: DHT Sensor Library, ArduinoJson, ESP8266Wifi and ESP8266WebServer (both should be built-in). You can install all of those with the Library Manager under Sketch -> Include Library -> Library Manager ....

Before you can upload and test the code, there are a few things you have to adjust for your WiFi settings and a few things I would like to explain. First, you want to change Line 7 with the pin you used to connect your DHT11 Data line to your ESP8266. If you have been using D5 as I suggested in the wiring section, 14 is the correct number here. For everything else, see [NodeMCU Pinout](pinout.png). Also, if you are using a DHT22, which also works, change the line just above that to DHT22. Second, you want to add your WiFi settings in line 9 + 10 where it says WLAN_SSID and WLAN_PASSWORD. Put your WiFi SSID in between the quotation marks. This should get you going. Go ahead and upload the sketch to your NodeMCU. We’re going to give it a test run before I continue explaining what you’ve just uploaded to your NodeMCU and run on your WiFi…

How would we do it? Let’s have a look at the interesting parts of the sketch. Again, I won’t go over the things that have been covered [before], therefore I will spare you details on how we’ve read from the DHT11 sensor and we go straight ahead to check out the ESP/WiFi stuff.ESP8266WebServer server(80); First, we have to initialize our server by creating a server handle with the port number as argument. As we’re going to use HTTP, we’re going to use port 80. Next, we want to tell the ESP which mode to run. That’s going to be station infrastructure mode for us (WIFI_STA) and then we can begin to connect to our WiFi network.WiFi.mode(WIFI_STA);

In the next episode in this ESP8266 programming series, we’re going to implement MQTT and we’re going to look at multiple solutions on how we can visualize our MQTT data and use it.

esp8266 tft lcd weather station made in china

The screen was set to enter sleep mode in 10 sec.And it would be wake up when you touch the screen.You can custom that period of time by applying changes to the code in weather_station_color.ino.