ESP32 OTA status on TFT display

If you have your ESP32 connected to a display, wouldn’t it be nice to see the status of an OTA update in real time on this display? I thought it is a nice little add on to my application. And as it is working fine within my ESP32 weather station, I share here as a stand alone code, which makes it easier to understand and integrate into your own application. In this example I will use a 1.44″ TFT display from Elecrow.

Read more

ESP32 Weatherstation

The ESP32 is a nice module with plenty of connectivity possibilities, digital IO’s, analog input, and touch pad inputs. When I got my first ESP32 I started playing around with it to explore all its possibilities. The result is a small weatherstation that collects weather information from different sources and displays them on a 1.44″ TFT display. The result is still on a breadboard and not included into a housing yet. The main goal was to test as many connectivity options

Read more

Used parts, libraries and the application source code

Parts list Part Manufacturer Source ESP32 Elecrow  CircuitRocks Philippines 1.44″ TFT Elecrow CircuitRocks Philippines TSL2561 Adafruit CircuitRocks Philippines LDR ??? local electronic parts shop DHT11 Elecrow CircuitRocks Philippines Libraries TSL2561 Github PlatformIO Arduino IDE DHTesp Github PlatformIO Arduino IDE TFT_eSPI Github PlatformIO Arduino IDE MQTTClient Github PlatformIO Arduino IDE ArduinoJSON Github PlatformIO Arduino IDE Ticker-esp32 Github PlatformIO Arduino IDE Source code Github

Read more

Using the multitasking capabilities of the ESP32 / FreeRTOS

One thing that I wanted to learn more about is the multitasking capabilities of the ESP32. I digged into the ESP-IDF manuals and found helpful information about the FreeRTOS SMP and how it works. What I found then is that if you program the ESP32 using the Arduino core for ESP32 as your framework, then it is quite simple. Then loop() is running as a task already in parallel to others that handle WiFi, BLE, … To split your app tasks

Read more

ESP32 SPI TFT display

I had this tiny TFT display laying around from another project and thought that is a good start to play with my new ESP32 module. I knew that the interface to the display is SPI and the driver chip is an ILI9163. The screen resolution is 128×128 pixel. Next page shows how the ESP32 and the display are connected.

Read more

ESP32 I2C and ADC – Light sensor digital and analog

Even the brightness or light values are not really important for a weather station,           I added this information as well in my first ESP32 project. I did it mainly because I could learn how to use the I2C connection and the analog to digital converter of the ESP32. I had two sensors laying around for this, one is a TSL2561, a sensor that measures light and returns the values in Lux. I have a module

Read more

ESP32 Using the touch pads

The ESP32 has the capabilities to define up to 10 GPIO’s as Touchpads. There is no external hardware needed, it requires only to connect a pad (piece of metal or just an uninsulated wire) to the GPIO. This is an example of a pad I used for testing:   As you can see I just used a piece of scrap metal with a wire soldered to it. The wire then was directly connected to the GPIO of the ESP32. I was

Read more

ESP32 DHT11

The DHT11 (or DHT22 and similar) are cheap temperature and humidity sensors. The communicate with a uC is over a single wire, but unfortunately it is not compatible with the 1-Wire protocol defined by Dallas Semiconductors. The electric connection to the ESP32 is very simple, as the DHT series can be powered direct with 3.3V. Only 3 wires are needed: VCC, GND and the data line. Important is that a 10kΩ or at least 4.7kΩ resistor is needed between the

Read more

ESP32 BLE server

I wanted to try out the BLE capabilities of the ESP32. I will not go into deep explanations how BLE works. Adafruit has a nice tutorial that explains details. To learn about BLE, check out the Introduction to Bluetooth Low Energy. As I have temperature and humidity sensors attached the logical step would be to set it up as an environment sensor. I checked  the Bluetooth GATT services to find out if there is something matching defined. And there is

Read more

ESP32 UDP broadcast listener – get information from other sensors

In my home control project I have several ESP8266, Arduino Yun and Arduino Uno WiFi modules placed all around my house. They have different functions like motion detection, alarm system or remote light control. These devices announce their status as UDP broadcasts on my local WiFi network. Why using UDP broadcast instead of a point to point transfer? Because I want to have the status available on any phone, tablet or computer without the need of a central server, I

Read more
Free Link Directory