ESP32 Bluetooth Serial and BLE server running together

There is a new kid coming into the arduino-esp32 world. A Bluetooth Serial library that allows you to use Bluetooth (not BLE) like a serial port. This way you can connect the ESP32 over Bluetooth to an Android app like the Serial Bluetooth Terminal and use it as a serial in/out interface. The library is not yet in the arduino-esp32 repository, but I grabbed a preview from copercini’s repo. It is working fine, I could connect my Android tablet to my

Read more

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

Analog Read seems to be slow

Issue #1373 analogRead() seems to be slow. Reason: Arduino ADC library takes by default 8 samples and returns the average value. The number of samples can be changed with the command

 

Read more

ESP32 Using the HW timers

When I started programming on the ESP32 there was no Ticker library available as I was used to from the ESP8266 and Arduino. So I decided to write some code that makes it easy for me to use the ESP32’s hardware timers. But before I explain the code, some essentials about the HW timers. There are only 4 HW timers available, so the code snippet I made is supporting only 4 timers. The code snippet for the HW timer wrapper

Read more

ESP32 WiFi setup over Bluetooth Serial (ESP32 code)

In my other post I wrote about setting up the ESP32 WiFi credentials over BLE. While testing and playing around with different phones, I found that even a quite new (but as well very cheap phone) I have does not support BLE. So I sat back in front of my development IDE and wrote something similar, but this time using Bluetooth Serial as communication. Most of the code is the same as in ESP32 WiFi setup over BLE so I

Read more

ESP32 WiFi setup over BLE (ESP32 code)

Most small applications that we write have the WiFi credentials integrated in the code. But sometimes you do not want to have your WiFi credentials in the source code, specially if it is open source and maybe accessible as a repository on Github or Bitbucket. Having the WiFi credentials in the code is as well not practical if you sell your devices to others that need to setup the WiFi credentials according to their local network. There are several solutions

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.         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
Free Link Directory