If you are connecting an ESP32 to a UART device, both sides normally need to use the same baud rate. For example, if your external module is sending data at 9600 baud but your ESP32 is listening at 115200 baud, the data will not be read correctly. Fortunately, some ESP32 …
Read More »Understanding -O1, -O2, -O3, -Os, and -Og in Embedded Firmware
flashWhen compiling embedded C or C++ firmware, you will often see compiler flags such as -O0, -O1, -O2, -O3, -Os, and -Og. These are compiler optimization levels. They tell the compiler how much effort it should spend improving the generated machine code. For desktop applications, optimization usually means “make the …
Read More »Structures and Padding in Embedded Systems: Why sizeof() Is Bigger Than You Expect
In embedded systems, every byte matters. Whether you are working with a small 8-bit microcontroller, an ARM Cortex-M device, or a memory-constrained IoT module, understanding how data is stored in memory can help you write more efficient and reliable firmware. One common source of confusion is the size of struct …
Read More »ESP32 Time-of-Flight Sensor Tutorial (VL53L0X / VL53L1X Distance Measurement)
When I first moved from ultrasonic sensors to Time-of-Flight (ToF) sensors, the difference was night and day. Measurements became faster, more stable, and far more precise. In this tutorial, I’ll show you exactly how I use a ToF sensor like the VL53L0X with the ESP32. What is a Time-of-Flight Sensor? …
Read More »How to Use an NPK Soil Sensor with ESP32
If you are building a smart agriculture project, one of the most useful things you can measure is the nutrient condition of the soil. Moisture sensors can tell you if the soil is wet or dry, but they cannot tell you whether the soil still has enough nutrients for healthy …
Read More »Sensor Reading Filtering (Arduino & Embedded Systems)
When I first started working with sensors, I expected clean, stable readings. Instead, what I got were values jumping all over the place. A temperature sensor would fluctuate ±2°C, an ADC reading would jitter constantly, and analog signals were almost unusable without processing. That’s when I realized: raw sensor data …
Read More »Solving BLE and Wi-Fi Concurrency on ESP32 Using FreeRTOS
Running Bluetooth Low Energy (BLE) scanning and Wi-Fi networking at the same time on an ESP32 sounds straightforward—until it isn’t. Many developers discover that once BLE scanning starts, their Wi-Fi web server becomes unreliable. Pages load intermittently, HTTP requests time out, or BLE scans suddenly stop when Wi-Fi traffic increases. …
Read More »How to Send ESP32 Sensor Data to Google Sheets (2026)
In this tutorial, I’ll show you exactly how I send sensor data from an ESP32 to Google Sheets every hour.
Read More »How To Use an ESP8266 WiFi Relay Board
If you’re looking for a simple but powerful way to control AC or DC devices over Wi‑Fi, the ESP8266 relay board is one of the best places to start. I’ve used ESP8266‑based boards in many hobby and semi‑professional projects, and relay boards are usually the first real‑world application people build.
Read More »How I Built an Alexa-Like Voice Assistant Using Raspberry Pi 5 and an LLM
In this tutorial, I’m going to walk you through how I built my own voice assistant—similar to Alexa or Google Home—using only a Raspberry Pi 5, a USB microphone, a speaker, and an LLM with text-to-speech (TTS) and speech-to-text (STT) support. By the end of this guide, you’ll have a …
Read More »