wemos tft display quotation

The project gets the weather forecast from the openweathermap.org website. In order to parse the weather data we need the excellent Arduino JSON library. We also need two libraries for the display.

Let’s see the code now. At first, we have to set the SSID and the password of our WiFi network. Next, we have to enter the free APIKEY from operweathermap.org website. In order to create your own API key, you have to sign up in the website. Getting current weather data and forecast is free but the website offers more options if you are willing to pay some money. Next, we have to find the id of our location. Find your location and copy the ID which can be found in the URL of your location. Then enter your city’s id in the CityID variable. The last step is to enter your time zone in order for the project to display the correct time. Now we are ready to move on.

At first, we connect to the WiFi Network. Then we request weather data from the server. I only request one result, the weather forecast for the next 3 hours. You can easily modify the code to get more forecast results if you wish. We get a reply with the weather data in JSON format. Before sending the data to the JSON library I manually delete some characters that were causing me problems. Then the JSON library takes over and we can easily save the data that we need in variables. We have to take a look at the structure of the JSON data that the openweathermap website replies to see how to get the data we are interested in. After we have saved the data in variables, all we have to do is to display them on the screen and wait for 30 minutes before requesting new data from the server. We display the time of the weather prediction, the temperature and the weather icon. The weather icons consist of some bitmap graphics and some simple shapes. I have also prepared a version of the code which displays the temperature in degrees Fahrenheit.

wemos tft display quotation

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.

This time assembling the kit needs basic soldering skills. With the excellent tutorial by Daniel Eichhorn  (https://blog.squix.org/wifi-color-display-kit) this should be a piece of cake. The only consideration is what kind of headers to use. I opted for the ‘larger but flexible’ approach. That way I can separate the boards if needed.

wemos tft display quotation

I really love the Wemos D1 mini platform! I bought one of those little WiFi enabled boards a few weeks ago and I"ve been playing around with it for quote some time now. One of the most interesting things was controlling it using the Blynk App. There"s a good Instructable on that as well. A must read as well when you"re not familiar yet with setting up your Arduino IDE for the Wemos D1 board (see the steps in Step 2)The Wemos D1 mini family has 9 shields (10 if you count the protot...

wemos tft display quotation

A few weeks ago, I made a video about this small 1.5” e-paper display and I built a simple thermometer with it in another video. You can watch those videos by clicking on the cards here. I really like e-paper displays and when I discovered this big 2.9” inch e-paper display I ordered one to test it. The display costs around 23$, you can find a link to it below. Compared to the 1.54” inch display which costs around 20$ the bigger display offers better value for money, but still expensive for most projects.

The reason I like to use e-paper displays is that they have some unique characteristics. E-Paper or Electronic paper are displays that unlike traditional LCD or OLED displays does not emit light but reflect light. It is like the ink on the paper. This characteristic makes e-paper displays very comfortable to read, and they have excellent readability under direct sunlight. Another great thing about e-paper displays is that they can hold static text and images for months without electricity! Yes, that’s correct, the display can show text and images even when it is off! That makes e-paper displays ideal for low powered projects!

Unfortunately, there are some disadvantages as well. The price of e-paper displays is still very high. Another significant disadvantage is that e-paper displays take a lot of time to update, as much as 2-3 seconds. So, they are only helpful for static text and images and not animations.

Let’s now see how to use this 2.9” E-Paper display with the ESP32 board. The display offers a resolution of 296x128pixels and it uses the SPI interface to communicate with the microcontroller. You can use any 3.3V microcontroller you wish. I prefer to use the ESP32 board which is inexpensive and very powerful. I am using this DOIT ESP32 development board. There is a newer version of the board, this one, which offers more pins, which works as fine with the display as well using the same pins.

It is a 3.3V display so Vcc must be connected to the 3.3V output of the ESP32 Board. The next pin is GND and it goes to GND. The third pin is named DIN and it goes to Digital Pin 23. The fourth pin is CLK and it goes to Digital Pin 18. The fifth pin (CS) goes to digital pin 5, the 6th pin to digital pin 22, the 7th pin to digital pin 21 and the last pin to digital pin 4. That’s it; we are now ready to load a sketch to the ESP32 and watch the display in action.

If we power up the project, we can see that it successfully drives the display. I have loaded a simple sketch which at first it displays some text, and then some bitmap images I have loaded. As you can see, the display works fine and once every few seconds it displays a new quote. If I unplug the board from power you can see that the display does not go blank. It retains the bitmap image intact without using any power at all! That’s why I love e-paper technology so much!

Let’s now go to the computer to see the software side of the project. We are using the GxEPD library in this example. As you can see, at the setup function I am displaying some text, and then I display some bitmap images one after another. The bitmap images are converted to data arrays using the Image2LCD software. I will show you how. Let’s add another bitmap image to the project.

We are going to use Paint.net a free image editor. At first, we create a new document and we enter the resolution of the display here. 296 pixels width and 128 pixels in height. Next, we design the bitmap file we want to load to the display. I will create another Elon Musk quote file. When ready we select File -> Save As and we save the file a bitmap file. Now we have to load another software in order to convert the bitmap file we just created to a data array that the GxEPD library can use.

We load the Image2LCD software. We open the bitmap file we created and it appears on the screen. We select vertical scan here, and we enter the resolution of the display here: 296 here and 128 here and press this small button here. Next we deselect this checkbox and check this one. Then we press save, and the software will create a data array. Now, all we have to do is to copy this array and paste it into the BitmapGraphics.h file like this. Now we can use this bitmap image in the project.  If we upload the sketch to the ESP32 board once more, we can see, that it displays the new bitmap just fine. Cool! You can find the code of the project the Image2LCD software in the description of the video below.

I really like this e-paper display because it is bigger and it needs no power when it is not updating. I am thinking of creating a simple project with it. If you are a long time viewer of the channel, you know that I love quotes. So, I am going to build a simple device which will remind me of the new quote once a day using this display. It can be battery powered since the display will be updated once a day. I think it will be cool. Stay tuned!

I would love to hear your opinion about this e-paper display. Do you like it, and are you going to use it in any of your projects? Please post your comments below. Thanks!

wemos tft display quotation

This D1 TFT & I2C Connector Shield enables the connection of a D1 TFT Shield or the connection of a device via I2C. With this shield you can easily connect a TFT display or make I2C connections.