Designing a Web Server Based on ESP-IDF for ESP32

Designing a Web Server Based on ESP-IDF for ESP32

1. Code The web server based on the ESP32 IDF framework includes WiFi connection, HTTP service, front-end interaction, and hardware control functions: #include <stdio.h> #include <string.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_system.h" #include "esp_wifi.h" #include "esp_event.h" #include "esp_log.h" #include "nvs_flash.h" #include "esp_http_server.h" #include "driver/gpio.h" #include "cJSON.h" // WiFi configuration #define WIFI_SSID "your_SSID" #define WIFI_PASS "your_PASSWORD" … Read more

ESP32 MicroPython UART Testing

ESP32 MicroPython UART Testing

1. Key Points of UART Hardware Resources and Configuration UART Resources of ESP32ESP32 supports 3 UART controllers (UART0, UART1, UART2), but actual availability is limited by pin conflicts: UART0: Default for REPL debugging (flashing and serial monitoring), using GPIO1 (TX), GPIO3 (RX) UART1: Some development boards connect to external Flash/SD cards (conflicts should be avoided), … Read more

ESP32 MicroPython WiFi Testing

ESP32 MicroPython WiFi Testing

Development Steps: Connection Process 2. Core Functions Station Mode (Connect to Router) AP Mode (Create Hotspot) Network Scanning HTTP Requests Socket Communication Test Code: 1. Connect to WiFi (Station Mode) import network import time # Configure WiFi SSID ="your_wifi_ssid" PASSWORD ="your_wifi_password" sta_if = network.WLAN(network.STA_IF) sta_if.active(True) if not sta_if.isconnected(): print("Connecting to WiFi…") sta_if.connect(SSID, PASSWORD) # Wait … Read more

ESP32 Development – Part 1 (Quickly Set Up ESP-IDF Development Environment Using VS Code)

ESP32 Development - Part 1 (Quickly Set Up ESP-IDF Development Environment Using VS Code)

Install the ESP-IDF Plugin Press the shortcut key ctrl+shift+p Type <span>esp-idf extension</span> and press Enter select ESP-IDF: Configure ESP-IDF Extension Wait for the configuration to complete in the bottom right corner Then click express Select the version starting with v (choose a stable version) Select the path to store the ESP-IDF source code and the … Read more

Comparison of PWM Output Functions between Arduino and ESP32 with XY-MC10 ESC Driving Example

Comparison of PWM Output Functions between Arduino and ESP32 with XY-MC10 ESC Driving Example

In this article, we will briefly compare the PWM output capabilities of Arduino and ESP32, and then use both to drive the same electronic speed controller (ESC). 1. PWM Output Function of Arduino In Arduino, we can use the analogWrite() function to output PWM signals. This function has two parameters: pin and duty cycle (0-255). … Read more

Pitfall of Pushing Video Stream Data via 4G Module with ESP32-CAM | Learning Notes on Falling into a Pit

Pitfall of Pushing Video Stream Data via 4G Module with ESP32-CAM | Learning Notes on Falling into a Pit

It has been nearly two weeks since I last wrote a record. Who knows what I have experienced during this time? With a somewhat heavy heart, I document a recent pitfall I fell into. The heaviness comes from the fact that this pitfall was caused by a very, extremely basic mistake, and such a basic … Read more

Basics of Embedded Programming | DHT11 Driver Code for ESP32 Based on ESP-IDF (C Language, C++ Language)

Basics of Embedded Programming | DHT11 Driver Code for ESP32 Based on ESP-IDF (C Language, C++ Language)

01Introduction: Let’s get straight to the point. 02Content 1. C Language Implementation #include <stdio.h> #include "driver/gpio.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #define DHT11_GPIO 4 // Use GPIO4 #define DHT_TIMEOUT 10000 // 10μs timeout // Data storage structure typedef struct { int humidity; int temperature; bool checksum_ok; } dht11_data; // Initialize GPIO void dht11_init() { gpio_set_direction(DHT11_GPIO, GPIO_MODE_OUTPUT); … Read more

Common Pitfalls for ESP32 Beginners

Common Pitfalls for ESP32 Beginners

When I was developing products, I used to scoff at the ESP32, thinking it was just a toy, lacking reliability, ease of use, and anti-interference capabilities for actual products. However, later on, when some of Xiaomi’s smart home products began to adopt it in large quantities, my perspective changed slightly. Nevertheless, I still wouldn’t use … Read more

TinyML-ESP32 Project: Gesture Recognition, Voice Wake-Up, and Jump Rope Counting

TinyML-ESP32 Project: Gesture Recognition, Voice Wake-Up, and Jump Rope Counting

TinyML-ESP32 Project: Gesture Recognition, Voice Wake-Up, and Jump Rope Counting. The TinyML-ESP32 project, supported by Black Walnut Lab, pushes the performance of the ESP32-WROOM-32 development board to the limit, achieving three major AI capabilities: gesture recognition, voice wake-up, and motion counting. Gesture Recognition: From data collection to model deployment, the project captures motion trajectories in … Read more

Implementing a Clock Dial on the ESP32 Handheld Device Using LVGL

Implementing a Clock Dial on the ESP32 Handheld Device Using LVGL

Previously, we introduced how to flash the <span>LVGL-Micropython</span> firmware onto the Little Cat handheld device, showcasing effects such as displaying GIF images, bar graphs, line graphs, zooming and rotating images, and simple dashboards. This note will continue to share how to implement a clock dial based on <span>LVGL-Micropython</span>. 1. Development Board Introduction This handheld device … Read more