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.         The hardware connection: For the connection to the ESP32 I chose the default VSPI pins on my ESP32 module. MOSI -> GPIO23 MISO -> GPIO19 (not used as

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

ESP32 UDP broadcaster to send information to other devices

As I want to have the basic data from my weather station available on other devices as well, the data is sent periodically as UDP broadcasts on the local WiFi network. As the status data of all my devices are “standardized” the broadcast message has to be in JSON object format like

where “de” is the device name, “wei” stands for weather internal “te” is the temperature “hu” is the humidity “hi” is the heat index “dp” is the

Read more

ESP32 HTTP GET – get weather condition from Weather Underground

Beside of local measured data, a weather station should as well display the current situation from a “professional” weather broadcaster. There are many API’s available from different online weather channels. I chose Weather Underground, because they offer a free account which is not as limited as e.g. Accuweather, which limits the number of accesses per day. The API of Weather Underground is well documented at their API website, they offer to get current conditions, forecasts and even satellite images. To

Read more

ESP32 MQTT client

So far the device is distributing the data within the local network. To make the information available on the ‘Internet‘, MQTT was chosen as the transportation protocol. I have a VPS rented at Contabo, which I can recommend, it is fast, reliable and cheap. I use this VPS for several purposes. It hosts this website, it runs an MySQL server that is used to store data collected from my solar panel and it runs as well a MQTT server. For

Read more

ESP32 OTA updates

Flashing new versions of your applications through the USB connection is convenient and fast during development time and as long as your module is on a breadboard and close to your PC. But once you have your project put into a casing and applied to the place it is supposed to be, it is getting inconvenient if you want to update your code. That’s where OTA comes in. It allows you to update your module code over your local WiFi.

Read more
Free Link Directory