r/esp32 • • Mar 18 '25 Bravo

Please read before posting, especially if you are on a mobile device or using an app.

257 Upvotes

Welcome to /r/esp32, a technical electronic and software engineering subreddit covering the design and use of Espressif ESP32 chips, modules, and the hardware and software ecosystems immediately surrounding them.

Please ensure your post is about ESP32 development and not just a retail product that happens to be using an ESP32, like a light bulb. Similarly, if your question is about some project you found on an internet web site, you will find more concentrated expertise in that product's support channels.

Your questions should be specific, as this group is used by actual volunteer humans. Posting a fragment of a failed AI chat query or vague questions about some code you read about is not productive and will be removed. You're trying to capture the attention of developers; don't make them fish for the question.

If you read a response that is helpful, please upvote it to help surface that answer for the next poster.

We are serious about requiring a question to be self-contained with links, correctly formatted source code or error messages, schematics, and so on.

Show and tell posts should emphasize the tell. Don't just post a link to some project you found. If you've built something, take a paragraph to boast about the details, how ESP32 is involved, link to source code and schematics of the project, etc.

Please search this group and the web before asking for help. Our volunteers don't enjoy copy-pasting personalized search results for you.

Some mobile browsers and apps don't show the sidebar, so here are our posting rules; please read before posting:

https://www.reddit.com/mod/esp32/rules

Take a moment to refresh yourself regularly with the community rules in case they have changed.

Once you have done that, submit your acknowledgement by clicking the "Read The Rules" option in the main menu of the subreddit or the menu of any comment or post in the sub.

https://www.reddit.com/r/ReadTheRulesApp/comments/1ie7fmv/tutorial_read_this_if_your_post_was_removed/


r/esp32 • • 2h ago

I made a thing! Halo — A Modern, Open-Source Desk Lamp for Your Cozy Moments

Thumbnail
gallery
21 Upvotes

A little light can make a workspace feel different.

Halo is a compact, rechargeable RGB desk lamp designed to bring ambient lighting and a touch of colour to your everyday spaces.

Built around the Waveshare ESP32-C3 Mini, Halo combines custom 3D-printed mechanical components, an ultra-slim RGB LED strip and a rechargeable power system in a minimal, circular design.

Inside the Design

Mechanical & 3D Printing

  • Custom enclosure designed from scratch in Autodesk Fusion 360
  • Four-part enclosure assembly
  • 3D-printed housing and structural components
  • Circular diffuser designed for smooth, uniform illumination

Embedded & Lighting

  • Waveshare ESP32-C3 Mini as the central controller
  • Ultra-slim 2.7 mm Waveshare RGB LED strip
  • Custom Arduino firmware using FastLED
  • Automatic ROYGBIV colour cycling with five-second intervals

Power & Portability

  • Rechargeable 18650 Li-ion battery
  • USB Type-C charging
  • Compact, cable-free design

Designed to Be Built

Halo is a complete, documented maker project. The repository includes the firmware, Fusion 360 CAD files, STL models, circuit diagrams and build resources.

The idea is simple: create a thoughtfully designed desk lamp that anyone can build, customize and make their own.

Whether it's on your desk, bedside table or shelf, Halo adds a little colour to your everyday moments.

Explore the Project

I'd love to hear your thoughts on the design, enclosure, lighting and possible improvements.


r/esp32 • • 17h ago

I made a thing! New to ESP32s and already amazed by what they can do.

Post image
172 Upvotes

Hey Reddit! I’m 15, and since my summer break, I’ve been developing an experimental blockchain for innovation and learning purposes. The blockchain itself isn't really the main topic here, so I’ll try to keep things simple. A blockchain can be an open network that anyone can join (what we call a P2P network—though a blockchain isn't necessarily a P2P network, and a P2P network isn't necessarily a blockchain, you get the idea...). The issue is that when a P2P network is just starting out, you usually need to find peers to connect to, so I decided to make this easier by building a bootstrap node. It's basically a participant in the network that acts as a meeting point.

Sorry for the pretty long post that doesn't necessarily fit this sub, I just wanted to share this because I’m amazed that a tiny circuit board costing under 10 euros can become the central point of a network and act as a sort of server.

Thanks for reading, and feel free to ask if you have any questions or recommendations!


r/esp32 • • 3h ago

I made a thing! Built an ESP32-S3 storytelling and learning device for my kids - 4.2" RLCD, RFID cards and a custom enclosure

10 Upvotes

I built a storytelling and spelling device for my kids on the Waveshare ESP32-S3-RLCD-4.2. There's a short demo here but most of this post is build notes.

Why this board

  • I'd already used the same codec pair (ES8311 for playback, ES7210 mic ADC) on an earlier ESP32-S3 voice project, so I knew the audio side would work.
  • 4.2" reflective LCD. It doesn't glow at bedtime and doesn't feel like a tablet.
  • ESP32-S3-WROOM: 16 MB flash, 8 MB PSRAM. Onboard microSD, RTC, 18650 holder with charger, and a 2×8 header that exposes the I2C bus plus GPIO.
  • The tradeoffs: no touch, and only two buttons firmware can read (KEY on GPIO18, BOOT on GPIO0).

Firmware stack

  • ESP-IDF 5.5.2, LVGL 9.5 through esp_lvgl_port, and my own driver for the panel.
  • Audio is small player on top of esp_codec_dev and esp_audio_codec (MP3 decode). The codec runs at 24 kHz both ways. The xiaozhi-esp32 board config for this board was a useful reference for pins and sample rate, but I didn't use its pipeline.
  • Two-button UI: BOOT short = next (lists and the top-level carousel wrap, there's no "previous"), KEY short = open/play/confirm (fires on press-down, so it feels instant), BOOT held 0.8 s = back. Every list also ends with a visible Back row, so a kid never needs the hold. A black footer always shows what each button will do right now ("● Play ▶ Next"). Designing menus for two buttons took more iterations.
  • SD card: FAT32 with long filenames (CONFIG_FATFS_LFN_HEAP=y, CONFIG_FATFS_MAX_LFN=255). Audio is 24 kHz mono MP3 at 48 kbps, played straight off the card.
  • Each grade's audio sits in its own folder of about 300 files. FAT lookups get slower toward the end of a big folder: opening a file took 6.5–20 ms depending on where it was in the folder, which is still fine for speech.
  • PN532 in I2C mode (0x24) on the same I2C bus as the codecs and RTC. It's polled 4 times a second with one attempt each. I link cards on the device: tap an unknown card, then press KEY within 12 s.

Feature 1: Stories (fully offline)

  • Panchatantra tales, retold for younger kids from Ryder's 1925 translation.
  • Pictures: one per chapter, 400×170 at 1 bit per pixel, in a small raw format that LVGL draws as an I1 image.
  • Each card resumes where that story stopped (position saved in NVS). Tapping the same card pauses or resumes, and tapping another card switches stories.

Feature 2: Spelling Bee (quiz needs Wi-Fi, practice can be offline)

  • Created my own word list of 306 words across grades 1–3. The official bee lists are copyrighted, so I wrote my own.
  • Recognition: the child spells aloud and presses KEY again, or just stops (3 s of silence ends it). On the device I drop the first 160 ms of mic audio, cut to the voice +0.3 s, and resample 24→16 kHz. Then it POSTs a WAV to a small FastAPI backend (extension to my last esp32 based language translator) and calls Azure Speech short-audio recognition.

Feature 3: Calendar

  • Our family Google Calendar is read through its iCal URL. The device fetches every 30 minutes between 6am and 10pm. Ten minutes before an event a reminder screen opens and plays a chime from the SD card for 2 minutes or until a button is pressed. No chime from 9pm and 7am.

Enclosure

The enclosure was probably the most challenging part. This is my first time using GPT-6 Astra for the 3D design and I'm super stoked with the outcome. Getting the mounting points, button alignment, USB-C access, SD card slot, battery clearance and RFID reader to fit took several iterations (but thankfully only 2 prints). CAD had always been a limitation in my previous hardware projects, and it doesn't look like will be the case anymore.

Things that bit me

  • The display went blank after light sleep and never came back. By default the IDF turns pins into floating inputs during sleep, so the panel's CS and RST lines floated. Fix: gpio_sleep_sel_dis() on the display pins and the amp-enable pin.
  • Wake on GPIO silently disappeared. I set it up at init, then the button driver called gpio_config() on the same pins and cleared it. Now I arm the wake sources right before every sleep.
  • Internal RAM. Wi-Fi + TLS + audio got down to ~31 KB free at the worst moment. Turning off ESP_WIFI_IRAM_OPT and ESP_WIFI_RX_IRAM_OPT gave back 17.6 KB. Big buffers (recordings, word lists, JSON) all go to PSRAM.

Curious to hear what others have built with reflective LCDs, particularly around battery optimization and UI design.


r/esp32 • • 3h ago

I made a thing! Streaming 5 GHz camera video with an ESP32-P4 screen and ESP32-C5

5 Upvotes

With 55 neighbor routers crowding 2.4 GHz around my desk (~76% channel load), I wanted my DIY Home Assistant hallway camera off 2.4 GHz instead of building around another ESP32-S3 camera board. Espressif's ESP32-C5 brings 5 GHz Wi-Fi 6, though it has no camera interface or display bus of its own. Meanwhile, the 8-inch ESP32-P4 camera touchscreen I bought had the MIPI-CSI camera pipeline, MIPI-DSI display, and hardware JPEG encoder I needed, except its internal companion radio was a 2.4 GHz-only ESP32-C6. Holding that onboard C6 in reset at boot let me wire a small ESP32-C5 onto its three-wire UART so the P4 handles video and UI while the C5 handles 5 GHz Wi-Fi.

Both chips run ESP-IDF 5.5. I looked at esp-hosted and PPP network tunneling first, then dropped both because Wi-Fi retries over a three-wire UART with no RTS/CTS flow control can stall the pipe; sending framed JPEGs into a custom ESPHome component on the C5 kept failure modes simple and gave me native Home Assistant discovery without maintaining a separate MQTT or RTSP stack. On the P4 side, Espressif's esp_video V4L2 stack and hardware jpeg_encode driver made more sense than porting older DVP-focused esp32-camera code or burning CPU on software JPEG, squeezing 320x240 frames into ~6 KB in about 3 ms while LVGL 9.3 drives the 8-inch UI and live charts at 15 fps.

My first fresh P4 build went straight into a boot loop, which is how I learned ESP32-P4 boards in the wild span early silicon and newer v3.0 steppings that need separate sdkconfig targets. Once it booted and I spent a few late nights going back and forth with AI on the glue code, two link quirks showed up at 2 Mbaud. Without hardware flow control, a sharp, text-heavy scene could swell past the C5's 16 KB UART buffer or block the UI thread, so the P4 drops frames non-blockingly when the wire is busy and re-compresses oversized frames harder on the fly. A normal dual-band Wi-Fi scan on the single-radio C5 also parked the radio off-channel long enough to freeze the live feed, so I interleaved 130 ms passive listens on one channel with 140 ms windows back on Channel 153 to flush queued frames. That scanner picked up 68 physical radios on 5 GHz vs 55 on 2.4 GHz around my desk, which looked like a bug in my math until the per-channel view showed only 8 of them sharing Channel 153 with me.

Plotting P4 serial output right above C5 Wi-Fi output on the screen also made wireless retries easy to spot, while keeping Wi-Fi video traffic at zero whenever nobody has Home Assistant open. The camera is still aimed at my office ceiling while I put off designing a rear mount for the C5, with source code, prebuilt images for both P4 revisions, and build notes on GitHub:

https://github.com/limengdu/xiao-esp32c5-labs/tree/main/D2-HA-5GHz-Sensor


r/esp32 • • 13h ago

I made a thing! I made a STICKMAN DECATHLON on esp32 s31 mosacio

23 Upvotes

A decathlon-style game where the board is the controller: shake to sprint, tilt in rhythm to swim/cycle/paddle, punch to throw. Ten events, hot-seat multiplayer, replays, ghosts, OTA updates and an optional online leaderboard. Video above, source at the bottom.

## Why the ESP32-S31 / ESP-Mosaico

Honestly, I picked the board before the chip: the Mosaico has everything a handheld game needs in one package: a 480×480 AMOLED, an IMU, audio, a vibration motor, a battery with a fuel gauge, and USB. But the S31 turned out to matter:

- **32 MB of PSRAM** is what makes replays and ghosts possible. Every event records per-frame state snapshots and replays them through its own renderer.
- **Enough CPU to software-render the whole screen at 40 fps** (everything is drawn in code, no sprite sheets apart from a few kayak sprites), with time left for audio synthesis.
- **16 MB of flash** fits two 3 MB OTA slots plus a separate NVS partition for the leaderboard cache.
- **Wi-Fi** for the leaderboard sync and OTA, but it's only switched on during a sync to save the 65 mAh battery.

## Libraries, and why

- **ESP-IDF 6.1 (plain C), not Arduino.** I needed direct control over DMA, the partition table, OTA with bootloader rollback and the USB stack. Most of the hard problems below would have been hidden (or unfixable) behind Arduino's abstractions.
- **No LVGL, my own strip renderer.** LVGL is great for widget UIs, but a game redraws the whole screen every frame. I render 48-row strips into two DMA buffers (one being drawn while the other goes out to the panel), so I never need a full framebuffer in the hot path.
- **TinyUSB CDC (through the board's USB console component)** for the serial port, plus a small protocol of my own to stream screenshots to a Python script. That's why the screenshots are pixel-perfect.
- **No MIDI player on the device.** A Python script converts national anthem MIDI files into melody + bass tables at build time, and a tiny software synth plays them. Much smaller and more predictable than parsing MIDI at runtime.
- **ESP Web Tools + esptool-js** so people can install it from the browser without installing ESP-IDF.
- **Cloudflare Workers + D1** for the leaderboard: no server to maintain, and the free tier covers a hobby project. Syncs are signed per board and sanity-checked server-side.

## Hurdles and edge cases

- **The serial port wasn't what I thought it was.** I assumed the game's COM port was the S31's built-in USB-Serial/JTAG. It's actually a TinyUSB CDC device on the USB-OTG HS controller. The USJ driver installed fine and received... nothing. On top of that, writing binary data through stdout got corrupted, because the console VFS translates line endings. The fix was talking to the TinyUSB CDC API directly, and muting logs while a screenshot is streaming.
- **Two COM ports.** The running game and download mode enumerate as different ports, and toggling RTS resets the chip. My flash script has to reset into download mode, wait for the other port to appear, then flash.
- **The fuel gauge lies for this battery.** The BQ27220's state of charge is way off for a 65 mAh cell, so the battery percentage comes from voltage instead.
- **Gestures you can't actually do.** My first discus had you physically spin the board. It was impossible and a bit dangerous. Flicking the board while steering a ball was too hard as well. The controls that work best turned out to be rhythm tilting and rolling a ball around the screen with tilt.
- **You can't watch the screen while shaking it.** Every action needed an eyes-free cue (a sound plus a vibration pattern), otherwise the 100 m was just guessing.
- **Keeping saves across updates.** NVS stays fixed at 0x9000 so OTA updates never touch records or athletes. Boards flashed before I changed the partition layout needed one web flash to move over.
- **Real-world Wi-Fi.** Testing on a phone/PC hotspot that gave no usable DNS, so the board falls back to public DNS servers.

## Known limitations

- It only runs on the Mosaico. Porting means swapping the board layer (display, IMU, audio).
- Gesture thresholds are tuned mostly on me, so I'd like to hear how they feel in other hands.
- The leaderboard has sanity checks but isn't cheat-proof.

Feedback welcome, especially on the gesture detection and the renderer.

Source: https://github.com/1verysimple-lab/stickman-decathlon
Flash from the browser: https://1verysimple-lab.github.io/stickman-decathlon/


r/esp32 • • 18h ago

I made a thing! I built my own AI Desktop Assistant using ESP32-S3 and Gemini

Post image
47 Upvotes

The project combines an ESP32-S3 N16R8, an ST7735 TFT display, an INMP441 microphone, and a MAX98357A audio amplifier with a speaker.

The system communicates with a Python server running on my PC, which connects to Google’s Gemini API to handle AI interactions.

Current features:

• Voice interaction

• AI-powered responses using Gemini

• TFT display interface

• Wi-Fi connectivity

• PC-hosted Python backend

My goal was to build a compact desktop assistant that combines embedded electronics with cloud-based AI.

This is still a work in progress, and I’m planning to improve its capabilities further.


r/esp32 • • 19h ago

I made a thing! Custom wake word & Keyword spotting on esp32-s3

37 Upvotes

- New custom keywords can be added without any training. Just retrieve the encoding from the web console and paste it in your code. Up to 15 keywords can be used in parallel.

- CPU: It uses 45% of one of the cores at 240 MHz and 63% at 160 MHz. During silence, CPU consumption will be close to zero.

- Memory: Very low RAM usage (15 KB) without any heap allocation. 300 kB of Flash, which can be optionally moved to PSRAM for slightly better performance.

- 8 languages are supported (English, Spanish, German, French, Italian, Chinese, Japanese, Portuguese). Each has its own library build.

- License is MIT for the demo and Apache 2.0 for the engine (TinyKW).

the demo: https://github.com/alexpg05/esp32-s3-keyword-spotting
the library: https://github.com/alexpg05/tinykw

Happy to provide support for other chips or listen to specific requests.


r/esp32 • • 5h ago

Software help needed ESP32-P4 Native USB (OTG/TinyUSB) Not Enumerating on Windows

3 Upvotes

Hi everyone,

I'm working on a computer vision project using an ESP32-P4-Pico-M board and a Raspberry Pi Camera Module v2 (OV5647). I need to transfer captured image data from the ESP32-P4 to a Windows PC over the board's native USB port.

I'm currently trying to get native USB device communication working in Arduino IDE, but the USB device does not enumerate on Windows.

Hardware

  • Board: Waveshare / Spotpear ESP32-P4-Pico-M
  • MCU: ESP32-P4, silicon revision v1.3
  • PSRAM: 32 MB
  • Flash: 32 MB
  • Native USB: P1 4-pin connector (USBD_N, USBD_P, GND, VCC_5V)
  • Programming/debug: Separate onboard CH343 USB-UART bridge, connected to COM6
  • Host: Windows PC

The P1 native USB connector is separate from the CH343 programming/debug port. I am using COM6 to upload firmware and monitor logs, while P1 is intended for native USB communication with the PC.

Software

  • Arduino IDE
  • ESP32 board package by Espressif Systems: 3.3.11
  • Board selected: ESP32P4 Dev Module
  • Upload mode: UART0 / Hardware CDC
  • USB mode: USB-OTG (TinyUSB)
  • USB CDC On Boot: Disabled
  • Chip Variant: Before v3.00
  • Flash size: 32 MB
  • PSRAM: Enabled

What I have already verified

Previously, I used ESP-IDF 6.1 on this same board and successfully:

  • Booted the ESP32-P4.
  • Initialized and tested the 32 MB PSRAM.
  • Detected the OV5647 camera.
  • Initialized the camera through esp_video.
  • Captured an 800 × 800 RGB565 image.
  • Verified that the captured image data changes between frames.

I also confirmed from the board schematic that P1 is the native USB connector and is separate from the CH343 USB-UART interface.

I previously attempted native USB using ESP-IDF/TinyUSB, but P1 did not enumerate on Windows. I switched to Arduino IDE to try a simpler USB device test.

Current problem

I located the Espressif USB library's USBSerial example directly in the installed Arduino package and compiled/uploaded it through COM6.

The upload completed successfully. However, the native USB connection on P1 still does not appear to enumerate as a USB CDC device on Windows.

I also tried the Arduino IDE's USB Keyboard example, but it failed to compile because it uses the generic Arduino Keyboard library and cannot find HID.h:

C:\Users\parth\AppData\Local\Arduino15\libraries\Keyboard\src/Keyboard.h:25:10:
fatal error: HID.h: No such file or directory

This appears to be the generic Arduino Keyboard example rather than an ESP32-P4-specific native USB example.

After flashing the USBSerial sketch, the programming UART showed the following boot output:

ESP-ROM:esp32p4-eco2-20240710
Build:Jul 10 2024
rst:0x1 (POWERON),boot:0x20f (SPI_FAST_FLASH_BOOT)
SPI mode:DIO, clock div:1
load:0x4ff33ce0,len:0x1174
load:0x4ff29ed0,len:0xd08
load:0x4ff2cbd0,len:0x3518
entry 0x4ff29ed0
E (113) esp_core_dump_flash: Incorrect size of core dump image: -2061056978

The output stops there. I am not currently trying to debug the core-dump warning; my immediate goal is to get native USB device enumeration working.

What I need help with

  1. Has anyone successfully used the ESP32-P4-Pico-M native USB P1 connector as a USB device with Arduino-ESP32?
  2. Is USB-OTG (TinyUSB) the correct Arduino Tools setting for native USB device mode on the ESP32-P4?
  3. Are there known issues with native USB CDC enumeration on Arduino-ESP32 3.3.11, especially on ESP32-P4 revision v1.3?
  4. Is there a minimal, known-working Arduino sketch for the ESP32-P4 that enumerates as USB CDC or another USB device class through the native USB connector?
  5. Are there any specific board-level requirements for enabling the native USB peripheral on this board that are not covered by the Arduino ESP32P4 Dev Module configuration?

I would appreciate advice from anyone who has successfully used native USB on this board or a similar ESP32-P4 board.

Thanks!


r/esp32 • • 13h ago

I made a thing! I Built an Offline Dictation Device with ESP32-S3 (for my AI and second brain) | PocketOS

Thumbnail
youtube.com
8 Upvotes

My first post here, I am building a little device that will act as my main entry point for AI and second brain with voice dictaction by default - there are many challenges but recently a paper on oido really surprised me so I had to try it

Code not included for the moment as this is still in totally more than beta - I will post updates on the YT channel as the thing goes

But for the more curious I suggest this Oído: Open-Vocabulary Speech Recognition on a $5 ESP32-S3


r/esp32 • • 1d ago

Advertisement I built LaunchGuard, an ESP32 weather display for RC flying and model rocketry

68 Upvotes

I kept checking Windy and my phone's weather app before going flying, then mentally putting the wind, gusts and cloud conditions together to decide whether it was worth heading out. I wanted a dedicated device that made those checks easier to read, so I built LaunchGuard.

The video shows the side button stepping through +2, +4, +6 and +8-hour forecasts, then switching between RC aircraft and model rocketry modes with a longer press.

The hardware is an ESP32, a 3.5-inch ST7796 SPI TFT, three separate status LEDs and one physical button in a 3D-printed enclosure, powered over USB. The firmware uses the Arduino framework and TFT_eSPI. Weather comes over Wi-Fi from a backend using Open-Meteo for a selected US ZIP code; the enclosure doesn't contain local weather sensors.

A couple of firmware details: hourly forecasts are cached on the ESP32, so stepping through them doesn't trigger a new HTTP request. Button input is sampled in a separate FreeRTOS task and passed through a queue so quick taps can still be captured during blocking network requests. Tap, mode-switch and setup actions are separated by press duration.

The display shows wind, gusts, rain chance and cloud cover, with GO / CAUTION / NO-GO indicators based on adjustable limits for the selected mode. It's a planning aid; local conditions still need checking before flying or launching.

I'd be interested in feedback on the single-button interface, and I'm happy to answer questions about the build.

Disclosure: I make and sell these. My Etsy listing is https://www.etsy.com/listing/4623677466/launchguard-wi-fi-weather-display-for-rc

AI assisted with the wording of this post; the device and demo footage are mine.


r/esp32 • • 19h ago

I made a thing! Made an ESP32 tachometer & telemetry logger for my Mercedes-Benz W123 250

Thumbnail
gallery
19 Upvotes

Hey everyone,

Since my Mercedes-Benz W123 250 (inline-six) doesn't have a factory tachometer and I wanted accurate, real-time RPM numbers while tuning my carburetor, I built a cheap digital tachometer and 10 Hz USB telemetry logger using an ESP32-C3 Super Mini, a 4N35 optocoupler, and an HT16K33 4-digit 7-segment display.

Here is the engineering breakdown behind the build:

1. Why I selected the ESP32-C3 Super Mini I went with the ESP32 platform because I was already comfortable with its hardware interrupts and micros() timing from a previous project where I built a custom wind vane angle sensor. As for the ESP32-C3 Super Mini specifically, it was just one I had laying around in my parts bin. And its microsecond timer accuracy was more than enough for pulse capture and I2C display output without needing Wi-Fi or Bluetooth overhead.

2. Which libraries I used and why

  • HT16K33 by Rob Tillaart: I chose this over the standard Adafruit LED Backpack library because of its simplicity and zero external dependencies (no Adafruit_GFX bloat). I only needed to push numbers, dashes, and a blinking colon to a 4-digit 7-segment display, and I was already familiar with Rob Tillaart's libraries so it was an easy pick.
  • Everything else (falling-edge hardware ISR, signal filtering, I2C, and CSV streaming) is written directly on top of the standard Espressif Arduino core.

3. Technical hurdles & hardware/software edge cases

  • 12V inductive noise vs. optocoupler edge speed: Older ignition systems throw a lot of coil ringing and double-triggers onto the 12V tach signal line. My first instinct was to add a debounce capacitor on the GPIO pin and a parallel shunt resistor (R2) across the 4N35 input LED to raise its turn-on threshold. In practice, capacitive loading slowed down the 4N35's switching edges, and the extra shunt resistor turned out to be unnecessary once the input side was simplified to just a 2.2 kΩ current-limiting resistor (R1), a 1N4007 reverse-polarity diode (D1), and a 4.7 kΩ pull-up (R3) on GPIO 3.
  • Why stateful software gates failed: Next, I tried a stateful software filter that locked onto two consistent intervals and used an adaptive 78% blanking gate to reject ringing. The catch with a stateful gate is that rapid throttle blips can look like "too-short" intervals and get blocked, or early switch bounce at startup can poison the baseline period.
  • Stateless interval coalescing + trimmed mean: I replaced the stateful gate with stateless interval coalescing feeding a 6-pulse trimmed mean. When electrical bounce splits a real spark interval into a short sub-interval (< 3,000 µs or a fraction of a normal pulse) followed by the remainder, the firmware glues the split intervals back together instead of discarding them. That restores the true spark period before it enters a 6-sample rolling buffer (one full engine cycle), where the min and max values are dropped and the middle 4 are averaged.
  • Decoupling display smoothing from telemetry: For carburetor tuning and analysis, I stream raw, unsmoothed 6-pulse RPM at 10 Hz over USB serial (captured with CoolTerm and plotted with a Python matplotlib script). For the physical 7-segment display, I apply a separate 4 Hz exponential moving average (EMA) rounded to the nearest 5 RPM so the readout stays steady without adding lag to the CSV log.

In the gallery:

  1. Quick test clip on the center console (recorded on an earlier 14-pulse version of the filter before switching to the 6-pulse coalescing logic)
  2. Plot comparing raw noisy pulse intervals (orange) against the coalesced 6-pulse output (blue) during idle and a few throttle revs
  3. Breadboard wiring layout
  4. Schematic

Full Arduino sketch, Fritzing diagrams, and Python plotting script are up on GitHub if anyone wants to check out the code or adapt it for their own project: https://github.com/stijnmeershoek/w123_esp32_tachometer


r/esp32 • • 20h ago

I made a thing! My ESP32-C6 holiday lights are sealed shut, so every OTA update has to prove itself or roll back

11 Upvotes
The first one, lit, beside its control unit. The screen shows the time since it was last turned on.

I built holiday lights on a Waveshare ESP32-C6-LCD-1.3 with ESP-IDF 6.0.1: 32 WS2812Bs inside 3D-printed ornaments, three buttons and the onboard 240x240 screen to run the effects, and a local HTTPS portal for the rest. They run with no network at all; Wi-Fi is for the portal and for updates. Disclosure up front: most of the code was written by AI coding agents and reviewed by other models and by me; the bench work and the decisions are mine.

Simulation: the firmware's C++ engine on a PC, ornaments from CAD.

Then I sealed the enclosure with the USB-C port inside and no service hole: a port in the wall would have meant pushing the board against one side or adding an extension cable. The first flash happens before the lid goes on; every update after that comes over Wi-Fi. So the question was: how does a new image prove it can still take the next update before the device commits to it?

Short version: ESP-IDF's app rollback (CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE) does the reverting. I added a signature check before anything is written, a stricter test of "working" than "it booted", and fallbacks for when the network or HTTPS breaks. Along the way an ESP-IDF corner case turned up where ESP_OK comes back although the old image still boots.

What a new image has to get through:

  1. Signature before the first erase. The update header lists each part's size and SHA-256 and is signed with ECDSA P-256. The signing certificate must chain to a root built into the running firmware. Nothing touches flash until that passes.
  2. Spare slots. Firmware and the effects pack (the effect definitions, kept apart so new effects need no new firmware) stream into inactive partitions, hashed against the header as they arrive. otadata, which picks the boot slot, changes only when everything matches, so by design a power cut halfway leaves the old firmware booting.
  3. Probation. The new image boots in ESP-IDF's pending-verify state (ESP_OTA_IMG_PENDING_VERIFY). Its tasks must start, it must stay up at least 60 s, and within 10 minutes a paired client, normally the browser or desktop app that uploaded it, must get a real answer through the normal access-checked API. A 401 (the new build rejecting a client that is already paired) doesn't count, and neither does a 404 from a routing bug: an image that refuses everyone can't take the next update. Otherwise the bootloader goes back.
  4. Escape hatches. If the home network is gone for 20 s, the board brings up its own password-protected access point, which takes a signed update over plain HTTP; if HTTPS fails to start in a new build, plain HTTP stays up for a signed fix. Either way the signature, not the transport, decides what installs.
The 240x240 screen, rendered by the firmware's own drawing code: playing, a pairing request, an update arriving.

I tested Wi-Fi updates, rejection of a foreign signature and automatic rollback on the real board. No Secure Boot: that's an accepted risk, written down in the docs, so that anyone building their own can still flash it over USB. Someone holding the board can flash it; over the air, nothing installs without the signature.

The ESP_OK that wasn't. My first confirm step was the usual one: call esp_ota_mark_app_valid_cancel_rollback(), get ESP_OK, done. An AI reviewer I pointed at the code found a corner case in the ESP-IDF sources (esp_ota_current_ota_is_workable(), which that call relies on). Boot state lives in two otadata sectors: A holds the new image's record, still pending verification, and B holds the old image's, already valid.

  1. To mark the new image valid, ESP-IDF erases sector A and writes it back. Say the erase succeeds and the write fails: the call returns an error, as it should.
  2. A is now blank or half-written, so the only valid record left is B, and B becomes the active one.
  3. The retry, the obvious reaction to the error, finds B already marked valid, has nothing to do, and returns ESP_OK.

My firmware would have reported success, then booted the old image at the next restart. It came from reading the code, not from breaking a flash chip: I checked the source myself but haven't reproduced it on hardware. Reported as esp-idf #19413, still open.

So now, after ESP_OK, it reads the state back: esp_ota_get_state_partition() must report ESP_OTA_IMG_VALID, and esp_ota_get_boot_partition() must be the running slot. It retries five times, then restarts and rolls back. The uploader also counts an update as done only if the board reports a new boot identity and the image and effects digests of the file it sent. A matching version string proves nothing.

GitHub (MIT) · OTA design

What do you check before marking a new image valid on a device you can't reach by cable?


r/esp32 • • 13h ago

Board Review NEMA 17 jittering when being controlled by an A4988 and ESP32-S3

3 Upvotes

Hello,

I am trying to create a self balancing robot, but the steppers keep jittering when trying to balancing. I'm thinking its a gyroscopic code calibration issue (I'm using MPU6050) but I'm I am also thinking it's a physical NEMA 17 issue. As I have bought these a couple months ago, I am having doubts. If you some how know the fix to this issue, please let me know. I haven't added the PID algorithm yet and it is still jittering

Code:

```
#include <Wire.h>
#include <MPU6050.h>


// I2C Pins for ESP32-S3
#define I2C_SDA 8
#define I2C_SCL 9


// Left A4988 Stepper Pins
#define STEP_L 4
#define DIR_L  5


// Right A4988 Stepper Pins
#define STEP_R 6
#define DIR_R  7


MPU6050 mpu;


// Raw sensor registers
int16_t ax, ay, az;
int16_t gx, gy, gz;


// Kalman Filter state (X-axis)
float kalmanAngleX = 0.0;
float kalmanBiasX = 0.0;
float P[2][2] = { { 0.0, 0.0 }, { 0.0, 0.0 } };


const float Q_angle = 0.001;
const float Q_bias = 0.003;
const float R_measure = 0.03;


// Loop and stepping timers
unsigned long prevImuTime = 0;
unsigned long lastStepMicros = 0;
unsigned long stepIntervalMicros = 0;


// ================= FAST RECOVERY + SMOOTH STOP =================
float Kp = 220.0;                        // Stronger reflex (hits 2500 max by ~11.5 deg)
float targetAngle = 0.0;
const float MAX_STEPS_PER_SEC = 2500.0;  // Your verified safe ceiling
const float ACCEL_CATCH_RATE = 180.0;    // Fast ramp-up to catch falls immediately
const float DECEL_SMOOTH_RATE = 55.0;    // Gentle ramp-down near upright to stop jitter
const float FALL_LIMIT = 35.0;


float currentSignedSpeed = 0.0;         // Tracks actual ramped wheel speed (+ forward, - backward)
// ============================================================


// 1D Kalman Filter Algorithm
float getKalmanX(float newAngle, float newRate, float dt) {
  float rate = newRate - kalmanBiasX;
  kalmanAngleX += dt * rate;


  P[0][0] += dt * (dt * P[1][1] - P[0][1] - P[1][0] + Q_angle);
  P[0][1] -= dt * P[1][1];
  P[1][0] -= dt * P[1][1];
  P[1][1] += Q_bias * dt;


  float S = P[0][0] + R_measure;
  float K[2];
  K[0] = P[0][0] / S;
  K[1] = P[1][0] / S;


  float y = newAngle - kalmanAngleX;
  kalmanAngleX += K[0] * y;
  kalmanBiasX += K[1] * y;


  float P00_temp = P[0][0];
  float P01_temp = P[0][1];


  P[0][0] -= K[0] * P00_temp;
  P[0][1] -= K[0] * P01_temp;
  P[1][0] -= K[1] * P00_temp;
  P[1][1] -= K[1] * P01_temp;


  return kalmanAngleX;
}


void setup() {
  Serial.begin(115200);
  Wire.begin(I2C_SDA, I2C_SCL);
  Wire.setClock(400000);


  pinMode(STEP_L, OUTPUT);
  pinMode(DIR_L, OUTPUT);
  pinMode(STEP_R, OUTPUT);
  pinMode(DIR_R, OUTPUT);


  mpu.initialize();
  if (!mpu.testConnection()) {
    Serial.println("MPU6050 connection failed!");
    while (1);
  }


  // Pre-seed Kalman filter
  mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
  kalmanAngleX = atan2(ay, az) * 180.0 / PI;


  prevImuTime = micros();
  lastStepMicros = micros();
  Serial.println("Step 3 (Smoothed): Proportional Catch Running...");
}


void loop() {
  unsigned long currentTime = micros();


  // 1. Read MPU6050 & compute ramped speed at 250Hz (every 4000 us)
  if (currentTime - prevImuTime >= 4000) {
    float dt = (float)(currentTime - prevImuTime) / 1000000.0;
    prevImuTime = currentTime;


    mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
    float accelRoll = atan2(ay, az) * 180.0 / PI;
    float gyroXRate = (float)gx / 131.0;


    float currentAngle = getKalmanX(accelRoll, gyroXRate, dt);
    float error = currentAngle - targetAngle;


    float targetSpeed = 0.0;


    if (abs(error) > FALL_LIMIT || abs(error) < 0.8) {
      // Target is 0 when fallen or upright inside 0.8 deg deadband
      targetSpeed = 0.0;
    } else {
      // Smooth proportional curve starting cleanly from 0 (no 300-step jump!)
      targetSpeed = constrain(Kp * error, -MAX_STEPS_PER_SEC, MAX_STEPS_PER_SEC);
    }


    // Smoothly ramp currentSignedSpeed toward targetSpeed (eliminates jitter)
    // Fast ramp-up when speeding up to catch a fall; gentle ramp-down near upright
    float speedDiff = targetSpeed - currentSignedSpeed;
    bool speedingUp = (abs(targetSpeed) > abs(currentSignedSpeed)) && ((targetSpeed * currentSignedSpeed) >= 0);
    float maxStepChange = speedingUp ? ACCEL_CATCH_RATE : DECEL_SMOOTH_RATE;


    speedDiff = constrain(speedDiff, -maxStepChange, maxStepChange);
    currentSignedSpeed += speedDiff;


    if (abs(currentSignedSpeed) < 30.0) {
      stepIntervalMicros = 0;
    } else {
      if (currentSignedSpeed > 0) {
        digitalWrite(DIR_L, HIGH);
        digitalWrite(DIR_R, LOW);
      } else {
        digitalWrite(DIR_L, LOW);
        digitalWrite(DIR_R, HIGH);
      }
      stepIntervalMicros = (unsigned long)(1000000.0 / abs(currentSignedSpeed));
    }
  }


  // 2. Unobstructed Stepper Pulse Generator
  if (stepIntervalMicros > 0 && (currentTime - lastStepMicros >= stepIntervalMicros)) {
    digitalWrite(STEP_L, HIGH);
    digitalWrite(STEP_R, HIGH);
    delayMicroseconds(4);
    digitalWrite(STEP_L, LOW);
    digitalWrite(STEP_R, LOW);
    lastStepMicros = currentTime;
  }
}```

r/esp32 • • 14h ago

AI Content RideSync: open-source ESP32 action-camera remote and ride logger — looking for bench testers

0 Upvotes

I’m building RideSync because I want one handlebar control for action cameras and a local ride log, with firmware that makers can adapt to BLE-capable ESP32 boards. It is an experimental bench project, not ride-ready firmware.

The current setup is a LILYGO T-A7670E R2. The firmware brings camera adapters, group control and logging into a composed bench application. GPS needs a compatible GNSS source; motion logging needs an IMU; microSD provides local storage. Other ESP32 boards still need pin mappings, driver adaptation and physical checks.

Observed on isolated ESP32 probes: an Insta360 X5 completed three remote recording start/stop cycles and reconnect; a ONE RS completed one successful recording cycle with playable footage. Those results do not qualify the final integrated firmware. GO 3S, HERO12 and DJI adapters still need camera-specific physical testing. GPS/motion accuracy and timecode synchronization are not established.

The MIT-licensed source, wiring notes, protocol research and hardware evidence are here:

https://github.com/llazzaro/RideSync

I’d welcome contributors who can help reproduce bench results, review the BLE reconnect/state handling, or work on another ESP32 board. If you have a compatible board and camera, please share the exact board, camera model and firmware in a GitHub issue so we can plan a reproducible test. Please start on the bench before considering motorcycle installation.

Which ESP32 boards and action cameras would you want to use together?

Disclosure: this introduction was drafted with AI assistance; the linked documentation distinguishes software tests from observed hardware results.


r/esp32 • • 1d ago

I made a thing! TV/Movies on ESP32-S3

13 Upvotes

I thought it would be a good idea to watch TV/Movies on ESP32-S3 powered screen. I was able to do 24fps comfortably in most of the cases.

It requires transcoding first, so something like the DLNA bridge is required. The source can be Channels DVR, DLNA or an M3U8. Works with Emby.

Waveshare boards tested

* ESP32-S3-Touch-LCD-1.54
* ESP32-S3-Touch-AMOLED-1.8
* ESP32-S3-Touch-AMOLED-2.06
* ESP32-S3-Touch-AMOLED-2.16

The best user experience - 2.06, the best battery life 2.16/1.54 - the latter boards do not make the TE pin available, so fast changing scenes may suffer.

https://github.com/hdhrgit/channelstv


r/esp32 • • 1d ago

AI Content Gaming in Linux on ESP32-S3

Thumbnail
gallery
87 Upvotes

Continuing the Linux development on the esp32-s3, got Wolfenstein 3D native Xtensa port running. Playable using a keyboard and mouse through a USB hub to the Arduino Nano ESP32.

It is software rendering and the game ran at about 15 FPS and its not because of CPU but rather because of the SPI bottleneck, running at about 26.67 MHz. We have GDMA enabled on the SPI bus which is now a new feature in this release. The display is an ST7789 1.3 inch 240x240 IPS, connected over SPI.

Here are the links to the Github and the Release for more detailed information.

Screenshots captured on device. Press F12 in game to capture screenshot which gets stored in the /tmp directory.

Little info about the system:

Board - Arduino Nano ESP32
CPU - ESP32-S3 with 8MB PSRAM and 16MB Flash @ 240MHz
OS - Linux 7.4.2 SMP (dual core) NoMMU Forkbank


r/esp32 • • 23h ago

Hardware help needed Esp32 ipod shuffle build

3 Upvotes

Hello everyone, I recently tried to replace the battery in my iPod Shuffle (4th gen) and sadly broke part of the board while opening it up. Since it's a very nostalgic device for me I was wondering if a repair using an esp32 would be possible.

However I am pretty new to electronics so I didn't know if there even is an esp32 which could fit the very compact chassy of the ipod shuffle (4th gen).

I didn't find official specs on how much internal space it has, but by my estimation it should be about 4mm x 27.5mm x 30mm.

I would be very thankful for your help in determining if this is even a possible project to do with esp32.

Thank you to everyone in advance! :)


r/esp32 • • 19h ago

Advertisement I built a desk cat on a esp32: PSRAM-cached room, dirty-box repaints, signed OTA, and a Claude Code hook

0 Upvotes

This started as a weekend toy on an esp32 and turned into the thing I look at all day. She lives in a little room on the 320x240 screen, purrs through the vibration motor when you pet her, and her window shows the real weather.

Some of the ESP32 problems that were fun to solve:

- **Frame time.** The room was ~72 ms per frame. Now it's painted once into a PSRAM buffer and only dirty boxes (sky, fairy lights, fish tank) are repainted, so the room is ~35 ms and a full frame ~102 ms. The SPI push (~32 ms) and a 150 KB PSRAM memcpy (~19 ms) are now the floor.
- **A crash in lwIP.** On Wi-Fi with no internet, failed DNS lookups piled up (~85 in 20 s) and eventually crashed inside `udp_input` with a LoadProhibited. Exponential backoff on connection errors fixed it.
- **Lost taps.** Menus took ~250 ms a frame because of a full-screen dim blend, and touch was only read once per frame, so quick taps vanished. I latched touch between frames and stopped redrawing static menus at all (~1 ms frames).
- **Signed OTA** with a per-unit device ID and secret, and pairing to an owner via a code on screen.
- **microSD:** diary, NVS backup and restore, your own photos in her wall frame, custom sounds and PNG outfits.

Smart home works with Shelly, Tasmota, WLED, Home Assistant and webhooks. A Mac helper sends her notifications and tells her what Claude Code is doing.

Happy to go deeper on any of it. I'm also making a small batch of ready-made units; the link is in the comments if anyone's curious.


r/esp32 • • 1d ago

Hardware help needed Pico zero and ESP32 S3 Supermini - power input

4 Upvotes

I have the 5v and GND pins of both boards connected which works perfectly when powered from one of the usb c connectors but one of the use cases requires both boards to be connected via usb to the PC and I was wondering if that could potentially cause any issues with providing too much voltage and frying the board(s) or do they have protections in place to avoid issues if they're both receiving power from usb while being connect via the 5v and GND pins.

These are the boards I'm working with:

https://a.aliexpress.com/_EHhOzh8 https://a.aliexpress.com/_EQM2s9s

Thanks.


r/esp32 • • 1d ago

Hardware help needed Advice: Kits for Advanced Users

11 Upvotes

I have never built anything with an ESP32 board and frankly know little about them. However, I have a brother-in-law that is a former software engineer that has been promoted to management. Over Thanksgiving he was lamenting that he no longer gets to build things at work and just spends his days managing people. So, I wanted to get him something for Christmas that he could build. Most of the kits I've found online are either 300+ piece beginner kits or just bare boards and everything else comes a la carte.

I think a good gift should be self-contained and not require him to spend any additional money to use, but the kits with 300+ pieces seem to be more geared toward beginners. So, can anyone recommend a kit that would provide someone who knows what they're doing a good project to work on in their spare time?


r/esp32 • • 1d ago

I made a thing! I made an ultra-thin ESP32 Bluetooth touchpad — 62g, 9mm thick, under $20

92 Upvotes

I made a Bluetooth touchpad using a cheap Lenovo S41 laptop touchpad, an ESP32-S3 SuperMini, a small display and a battery. I'd estimate the total cost to be under $20 USD. It weighs just 62g and is only 9mm thick.

Still handmade, still a spaghetti wiring enjoyer lol.

I've open-sourced the whole project:
https://github.com/gaowanliang/ESP32-BLE-Touchpad

The repo includes the wiring diagram and the enclosure model. I actually had AI design the enclosure by giving it the dimensions of all the components. I was too lazy to model it myself, so feel free to improve it if you're good at CAD.

It supports pretty much all the usual touchpad functions. Two-finger scrolling, one-, two-, and three-finger taps for left, right, and middle clicks, as well as tap-and-drag and physical click-and-drag for selecting text and moving windows. Gestures involving more than three fingers aren't supported due to the limitations of this particular touchpad. I barely use those gestures anyway, so maybe I'll look into it someday.

I guess one reason there aren't many DIY projects like this is that Synaptics uses proprietary touchpad protocols, so you pretty much have to figure everything out yourself with an oscilloscope or a logic analyzer.

I actually reverse-engineered the protocol and built the first prototype back in 2024. AI wasn't that capable back then, and tiny boards like the ESP32-S3 SuperMini weren't readily available to me, so I kind of left the project sitting there.

Now that AI can handle a lot of the work and the hardware has gotten smaller, I finally got around to finishing it.

Update:
closer photos:


r/esp32 • • 1d ago

Hardware help needed ESP32-C3 Super Mini enters download mode, but native USB disconnects and esptool gets no response over UART

2 Upvotes

I’m troubleshooting an ESP32-C3 Super Mini on Windows. I’m new to microcontrollers, and I’d like to narrow down the fault before replacing the board. I’ve tested two different connections.

1. Direct USB-C connection

I used a USB cable that I verified by transferring photos from my phone. I tried the board on two computers. On my main PC, Windows sometimes detects it as USB Serial Device (COM8) and USB JTAG/serial debug unit, but the port disappears shortly afterward. Windows recorded the device ID as VID_303A&PID_1001.

2. UART through an Arduino UNO R3

I held the UNO’s RESET pin low by connecting it to GND and used its USB-to-serial interface on COM5. A loopback test echoed 123. With a common ground and ESP GPIO21 connected to UNO pin 1/TX, I received this at 115200 baud:

ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0x7 (DOWNLOAD(USB/UART0/1))
waiting for download

On other resets, I saw SPI_FAST_FLASH_BOOT followed by repeated invalid header: 0xffffffff messages. I also saw RTCWDT_RTC_RST once. I haven’t successfully flashed a sketch onto this board yet.

What changed for the upload attempt

When I captured the boot log above, the ESP was powered through its own USB-C connector. For the upload attempt, I disconnected that cable and powered the ESP from the UNO’s 5V pin through the Super Mini’s 5V input. I also added the return data path from UNO pin 0/RX to ESP GPIO20 through a resistor divider: approximately 10 kΩ in series and 20 kΩ from the divider output to ground.

I measured about 3.3 V at the divider output while idle, and about 5 V and 3.3 V on the ESP board’s power rails. I don’t have an oscilloscope, so I couldn’t check the UART waveform or voltage dips during reset. In this configuration, I could no longer reproduce the boot log, even after disconnecting the wire to GPIO20.

In Arduino IDE 2.3.11, I selected ESP32C3 Dev Module, COM5, upload speed 115200, and USB CDC On Boot: Disabled. The sketch compiled, but esptool 5.3.1 failed before writing:

Connecting......................................
A fatal error occurred: Failed to connect to ESP32-C3: No serial data received.

My question: Given that the ROM boot log was readable when the ESP had its own USB power, what would you test next to distinguish a power or reset issue from a UART wiring issue? I have a multimeter and the UNO R3 available.

Edit:I tried holding BOOT, pressing and releasing RESET, and then releasing BOOT. The result is inconsistent. Sometimes Windows detects the ESP on COM8 and the port disappears shortly afterward. Other times I don’t see a port appear at all.
I saw waiting for download through the UNO’s serial bridge while the ESP was powered through its own USB-C port. For the failed upload on COM5, I had switched the ESP’s power source to the UNO’s 5V pin. I couldn’t reproduce the boot log in that setup, so I can’t confirm the ESP was in download mode during that upload attempt.


r/esp32 • • 1d ago

I made a thing! I made a free tool that fits any GIF onto an ESP32 screen (exact size, round displays, flash budget, C header)

3 Upvotes

Putting a GIF on a GC9A01 or ST7789 always took me five tools: resize, crop, round the corners, shrink it until it fits in flash, then convert it to a C array.

So I built gif4mcu, which does all of that in one step:

  • exact size for your panel (crop, letterbox or stretch), with presets for common displays
  • rounded corners, or a full circle for round 240×240 screens
  • a byte budget: it reduces colours, then frame rate, until the file fits, and keeps the total duration
  • exports a .h ready for bitbank2's AnimatedGIF (works with TFT_eSPI; an example sketch is included)

Web tool (runs entirely in your browser, nothing is uploaded): https://martinadrien-boop.github.io/gif4mcu/

CLI: npx gif4mcu cat.gif --display gc9a01 --max-kb 150 --header

Source (MIT, no dependencies): https://github.com/martinadrien-boop/gif4mcu

I'd love to hear which board and display you try it on. I'm collecting a "Tested on" table in the README, and feedback on what breaks is welcome.