Deep-Sleep needs WiFi and Bluetooth switched OFF for low current consumption

rudi48 made some investigations regarding power saving during deep sleep here. Summary: To achieve maximum power saving during deep sleep it is necessary to switch off Bluetooth and WiFi before calling esp_deep_sleep_start(); Example:

 

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

Communication between devices that doesn’t require a server (TCP code examples)

TCP packet communication Instead of implementing a “full” web server, I decided to go to a simpler TCP server – client connection. This eliminates overhead in the protocol but as well limits the usage. It is not possible to just use a browser (Chrome, Firefox, …) to send commands to a device. But I was not planing to use browsers anyway. TCP client (control device) example for ESP8266 To be able to send a packet over TCP it is only

Read more

Communication between devices that doesn’t require a server (UDP code examples)

UDP broadcast Two things to keep in mind about UDP broadcast: UDP broadcast is not a safe method. There is no check if anyone has received the packet. It is just sent out on the network and that’s it. If a recipient miss it, no warning or error is thrown. UDP broadcast works only in your local network. You cannot send a UDP broadcast to “the world”. ISPs, modems and specially mobile networks do not allow it. UDP broadcast sender

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