r/esp32

▲ 17 r/esp32+1 crossposts

ESP32 device exposes OpenAPI - instant admin UI (forms, GPIO control, telemetry charts) without writing a dashboard

I have been working on UIGen: a runtime that turns an OpenAPI spec into a full admin UI (sidebar nav, list/detail views, config forms, charts). No React codegen, no Retool-style manual wiring. Change the spec, the UI updates.

I built an ESP32 board simulator to show what this looks like for firmware folks who expose HTTP on the device (or on a Pi gateway in front of it).

The setup (two UIs, one API)

C++ simulator (visual demo)          UIGen admin UI (from openapi.yaml)
http://localhost:8080                http://localhost:4400
       |                                       |
       +----------- same REST API -------------+
  • :8080 — interactive DevKitC diagram, live GPIO/sensor cards, event log (hand-rolled HTML/JS for the “wow” demo)
  • :4400 — generated control panel: board status, pin CRUD, sensor list, telemetry table + line chart, config forms, blink/reset actions

Both hit the same endpoints: /api/v1/pins, /api/v1/sensors, /api/v1/readings, /api/v1/config, etc.

How the OpenAPI spec was written (important)

The openapi.yaml was not auto-generated from C++. There is no reflection in httplib/ESP-IDF to do that cleanly.

We used contract-first design (same idea as a shared header file for a wire protocol):

  1. Model device resources: board, pins, sensors, readings, config, actions
  2. Define JSON schemas that match what firmware will actually emit
  3. Write openapi.yaml as the canonical contract
  4. Implement C++ handlers to match (Pin, Reading, BoardConfig structs mirror the schemas)
  5. Serve the same file at GET /openapi.yaml

If you already have curl output or C struct definitions, you do not need to start from a blank YAML file. The repo includes an AI agent skill (generate-device-openapi) that walks through drafting openapi.yaml from route tables, Postman exports, sample JSON, or struct headers. Then a second skill (auto-annotate) writes .uigen/config.yaml (labels, charts, layout, ignore rules).

Pipeline:

generate-device-openapi  →  openapi.yaml
auto-annotate            →  .uigen/config.yaml
uigen serve openapi.yaml --proxy-base http://<device-ip>:8080

Skills live in the repo under SKILLS/ and are copied into the example at examples/apps/cpp/esp32-simulator/UI/.agents/skills/ for Cursor / Copilot-style assistants.

What UIGen actually generates from the spec

From standard REST patterns in OpenAPI:

Your API Generated UI
GET /pins → array List + table
GET /pins/{id}, PUT /pins/{id} Detail + edit form
GET/PUT /config Settings form
POST /actions/blink Action form with validated body
GET /readings?sensor_id=&limit= List + line chart

Annotations in .uigen/config.yaml (not in the spec itself) drive the polish:

  • x-uigen-chart on the readings list response: xAxis: recorded_at, yAxis: value, server query.limit: 500, LTTB downsampling to ~120 points, sensor filter via x-uigen-ref to the sensors resource
  • x-uigen-ref: sensor_id and pin_id show human names instead of raw integers
  • x-uigen-ignore: hide /health, /openapi.yaml, and the visual-only /api/v1/state snapshot from the sidebar
  • Layout: sidebar app shell; centered forms for actions like “Blink LED”

Chart filters refetch the list endpoint with query params your firmware already supports (sensor_id, limit). Client-side time window presets (1m, 5m, 1h, etc.) trim the x-axis for dense telemetry without extra API work.

Why this vs RainMaker / ThingsBoard / Node-RED

  • No platform lock-in - your REST API stays yours; UIGen is a UI layer
  • Spec is the product contract - firmware, docs, and UI stay aligned
  • Works offline on LAN - uigen serve proxies to http://192.168.4.1 (typical AP mode); no cloud account required for the demo

Tradeoff: you need a decent OpenAPI file. That is what the skill is for.

Try it

git clone https://github.com/darula-hpp/uigen.git
cd uigen/examples/apps/cpp/esp32-simulator

# Terminal 1: simulator (Docker or local build)
docker compose up --build
# → http://localhost:8080

# In another terminal — run UIGen from UI/ so .uigen/config.yaml is picked up
npx @uigen-dev/cli@latest serve openapi.yaml --proxy-base http://localhost:8080
# → http://localhost:4400

Example paths in repo: openapi.yaml, UI/.uigen/config.yaml, C++ routes in include/api_routes.hpp.

Roadmap: same spec, phone app (React Native)

We are working on a React Native target for the same OpenAPI → UI pipeline.

Plain language: today UIGen renders a web admin panel in the browser. The RN target will render a native iOS/Android app from the same spec and config - pin toggles, config screens, telemetry charts talking to your device over WiFi on the bench or in the field.

Think “companion app for technicians” without maintaining a separate Swift/Kotlin codebase. One openapi.yaml, web console for desk work, mobile app for walk-up commissioning. Still early; the ESP32 web demo is the reference implementation for now.

Links:

Happy hacking, Id appreciate feedback or suggestions

u/Prestigious-Bee2093 — 1 day ago
▲ 7 r/esp32

ESP32-P4 v1.3 EOL

Heads up for anyone using P4 v1.x in their boards, I just got this PCN announcing EOL. You will need to tweak board designs and recompile software for v3.x, it is not a drop-in replacement.

documentation.espressif.com
u/furyfuryfury — 1 day ago
▲ 165 r/esp32

I made a tiny ESP32 robot face. Now I’m trying to figure out how to make it feel alive.

This originally started as a small ESP32 AMOLED display experiment.

But after adding a few simple expression states like proud, helpless, cautious, and angry, it started feeling less like a UI demo and more like a tiny character.

Right now I’m trying to figure out the next step: not just the body itself, but how to give it actual presence and personality through movement, sound, timing, and interaction.

Would you go with:

  • wheels
  • legs
  • touch interaction
  • sound
  • or something completely different?
u/WuBuilt — 1 day ago
▲ 16 r/esp32

Built indoor positioning system on ESP32 Using 3 Anchor Nodes

I recently built a Wi-Fi RSSI-based indoor positioning system entirely on ESP32 microcontrollers.

I used 3 ESP32s as anchor nodes broadcasting Wi-Fi signals

1)TestNetwork1

2)TestNetwork2

3)TestNetwork3

and a 4th ESP32 for scanning the RSSI signal strength from each anchor. It applies a Kalman filter to clean up the noise and then uses those filtered distances for trilateration to compute a real-time 2D position — all running on-device in MicroPython, no external computer needed.

To calculate the A and n parameters used in the path loss equation, I collected 50 RSSI samples at 1, 2, 3, and 4 metre distances and applied a moving average to smooth the readings. Then used least-squares regression to fit A = −61.92 dBm and n = 1.64.

GitHub |  Linkedin

Raw Captured Data For Computation Of A And N

https://preview.redd.it/tdpfycx8jg2h1.jpg?width=800&format=pjpg&auto=webp&s=afa01aa24de47efd82f093ed9dcf62ec1fccbbb4

Setup Used To Capture Signals At 1M

Distance Estimation After Capturing RSSI Signals

Kalman Filter vs Raw On Network1

Kalman Filter vs Raw On Network2

https://preview.redd.it/uzytj4oejg2h1.jpg?width=800&format=pjpg&auto=webp&s=d96d503a4f26d0a13e58420febc1a03aa3489ca3

Moving Average Curve On Raw RSSI Captured For Calibration Of A And N

reddit.com
u/Dry-Thought7705 — 1 day ago
▲ 668 r/esp32+2 crossposts

RC Lego Wall-E moc

Last 6 months I made this little fella. Curious what you guys think haha. Full video on youtube (Crostplay2)

u/Crostplay_Florent — 2 days ago
▲ 354 r/esp32

eFortune Cookie - I Just Put an ESP32 Inside a Fortune Cookie

I wondered if a fortune cookie could actually hold an ESP32 and an e-ink screen. This playful idea inspired the eFortune Cookie, a tiny interactive gadget with an e-paper display. When you shake it, a random fortune pops up on the screen. It works completely offline and stores over 3,000 fortunes, so you do not need Wi-Fi.

I also added two fun mini apps, a dice roller and a coin flipper. You can switch between these features with a side button and then shake the device to get your result. It is a simple, entertaining little gadget that fits right on a keychain.

The challenge was putting everything in a small package because I am building this, not with a custom PCB. I am using some modules, so I had to cleverly place the sensor and battery behind the driver board.I had to spend some time on Fusion 360, but the result was a cute 3D-printable enclosure.

For this project, I used the XIAO ePaper Display Board, the EE05, paired with a 1.54 inch ePaper screen. A GY521 gyro sensor detects the shaking, and a small LiPo battery powers the whole thing. The EE05 is a great choice because it features an XIAO ESP32S3 plus with plenty of pins to connect the sensor, battery system, and buttons.

I also included the schematics for this project in this post

I hope you like my build. You can all the code, 3d files, and the build details on my Instructables page, link on the comments .so go ahead and build one yourself.

u/Choice_Border_8904 — 2 days ago
▲ 4 r/esp32

esp32 + vibration remote setup question

Forgive me since I am new to this space.

I am trying to build a remote controlled esp32 setup with a small battery pack (3.7V 1000mAh) and a 10mm x 3mm Coin vibrating motor that can be remotely controlled from a nearby computer. In speaking with friends, this seems feasible, but I am more concerned with the containment device.

I am most concerned with what to put this device in. I want it to be somewhat quiet and for it to go on my body. What sort of containment device would be best suited to do this without making a whole bunch of noise that's easily detectable? Thanks!

reddit.com
u/AccurateGlove9314 — 2 days ago
▲ 65 r/esp32

First project. Esp32 landscape zone lighting for home assistant

Why buy an off the shelf transformer at home Depot for $100 when you can spend $150 and DIY? Parts listed didn't cost $150 but I originally bought a different power supply that was too big and a few other odds and ends. Even with the extra cost, I'm much happier having local control vers another random app on my phone with questionable home assistant integration.

It's up and working but needs a few tweaks to clean up some wiring. I bought stand offs to fix the mounting holes that don't line up with the grid.

Code was mostly AI generated and then flashed through esphome on home assistant.

Landscape wires will come through the bottom and have in-line fuses. Right now I have 2 zones working but 4 would be possible. It's up and running in home assistant.

Open to any input/advice

u/TinCupChallace — 2 days ago
▲ 36 r/esp32+1 crossposts

ESP32 based DMX recorder for lighting installations

Hi everyone, i'm a newbie maker and i really have nearly inexistent C++ experience.

I needed an inexpensive device to record dmx signal and leave it in fixed lighting installations to avoid leaving expensive DMX consoles around.

So i started figuring out what i needed and ESP32 suited my needs.

For quick concept proof, i started with an M5Stack package (hoping it's not something outrageous from makers' POV lol) to understand if that was what i really needed and then move onto something more custom.

Regarding coding, i'll be honest with you, i just used Antigravity and AI aided me in almost everything (don't hate me guys, i'm aware of the risks).

A few iterations and everything works fine... i just need to improve the loop detection algorithm, but i'm very very satisfied with the overall experience. I hope that this is going to be the first step of a cool adventure!

If anyone ever had similar need, i can upload the repo (or do you always publish the repo by default even if none cares?)
If you have ideas for loop detections in DMX, lmk. or in general feel free to share your thoughts!

u/ingsanti — 2 days ago
▲ 55 r/esp32

Built a cyberpunk-style ESP32 smart desk companion!!

Built a cyberpunk-style ESP32 smart desk companion from scratch.

Features: • OLED analog + digital clock • Date, temperature & humidity display • Firebase-powered remote dashboard • Push notifications to the OLED • Timer + alarm system • RGB ambient lighting modes • Offline MP3 music player using SD card • Real-time synced lyrics display (.lrc support) • Browser-based music control UI • Wi-Fi AP mode for offline control • Dual-core ESP32 task handling • Automatic/manual time sync fallback

The whole thing runs on a single ESP32 with:

  • SH1106 OLED
  • DHT11 sensor
  • RGB LED
  • Buzzer
  • SD card module
  • custom web dashboard hosted on GitHub Pages

One button controls:

  • clock face switching
  • music mode
  • alarm/timer stopping

Long press enables a completely offline music player mode where the ESP32 creates its own Wi-Fi network and streams songs directly from the SD card to your phone.

Probably the most overengineered clock I’ve ever built 😭

u/Full_Opportunity8116 — 2 days ago
▲ 28 r/esp32

I built a small tabletop game where four ESP32 controllers talk to a main ESP32 over ESP-NOW (no router, no cloud).

I built a small tabletop game where four ESP32 controllers talk to a main ESP32 over ESP-NOW (no router, no cloud).

Flow:

  • Each player has their own controller (battery-powered ESP32)
  • A marble is thrown into the controller → IR sensors in printed channels detect which “hole” was hit
  • Score is sent wirelessly → camel moves (either on a physical track with steppers, or in a browser UI on a PC connected to the main unit)

Why ESP-NOW: low latency, simple pairing, works well for “throw → score → update” without juggling WiFi AP mode.

Hardware (short):

  • ESP32 per controller + one main ESP32
  • IR break-beam style sensing in 3D-printed parts
  • Hardware mode adds 28BYJ-48 steppers + endstops on the main unit

https://i.redd.it/g87awfszqb2h1.gif

reddit.com
u/Express_Pepper_7978 — 2 days ago
▲ 0 r/esp32

ESP32 clock / UART / timer calculator in the browser

Sharing RegCalc - handles baud, timer, PWM, ADC, bus clocks with an ESP32 profile (240 MHz defaults, tweakable).

https://regcalc.vercel.app/app

Free, no signup. I use it instead of re-deriving divisors on every project.

Happy to add ESP32-S3 / C3 specific defaults if you have a preferred board config.

reddit.com
u/Curious-Barnacle-781 — 2 days ago
▲ 0 r/esp32

ESP-IDF with VSCode : Unable to fix configuration issues

Hi.

I recently purchased the learnesp32 course online. I know it's old but it seemed complete. The installation process though is very old. After having followed the steps from the VScode marketplace, I copied the blink folder to another location and tried the doctor command to check the configuration but seem to be getting "undefined" for cmake and ninja despite getting the versions on the terminal showing up. None of the tutorials or installation procedures mention opening a workspace to run the doctor command. I created one because the chatbot in vscode said so. Can anyone help please?

P.S. I have esp 6.0.1 and espressif tools installed in the C drive and have created/copied the blink folder from the examples listed to a new folder in the F drive. The chat says that shouldn't create a problem and I don't think it does because I have set the IDF_PATH and IDF_TOOLS_PATH to point to the the folders in the c drive.

These are the notification messages even after configuring everything properly

reddit.com
u/Revolutionary-Pen916 — 2 days ago
▲ 0 r/esp32

Just Got My First ESP32 — Need Beginner Project Ideas 😅

Hey guys,
I recently started learning ESP32 and microcontrollers, and honestly I’m a bit overwhelmed with where to begin. I have an ESP32, a few basic components like LEDs, IR sensor, and a servo motor.

Can you suggest some fun beginner projects that helped you learn? I’d love projects that are simple but actually teach useful concepts along the way.

Any tutorials, YouTube channels, or beginner tips are also welcome. Thanks :)

reddit.com
u/rutherford_098 — 2 days ago
▲ 6 r/esp32

How do I fit a large datastructure into memory?

For a school project I'm programming on an esp32 and I want to use a kd-tree (basically a binary search tree made for locating points in space). I can store the tree on an SD card no problem, but the problem is when searching it it's likely that it'd not fit into ram. For now I need to store around 630 points in it so it might fit in with a tight squeeze but even so I'd like to find an alternative.

Do I just implement some sorta pseudo-cache where I prefetch nodes in the tree from sd card when I search through the tree? Or is there a smarter way to do this?

reddit.com
u/xXBigboi69Xx42 — 3 days ago
▲ 1 r/esp32

I want to build something simple but have no idea how

I‘m completly new to this. All I know is that an esp32 might be the way to do it.

The project is:

I want to make a physical reminder badge. You program it to turn on a led at a certain date / time or every x days / hours minutes. If you push a button it resets the cycle or turns it off, when it was a specific date.

In its final state it suppose to look like a round button that you put on a e.g. cat toilet to remind you it‘s about time to clean it.

It‘s a simple „in the real world“ reminder that you can‘t ignore as easily as a push notification on your phone.

How would I do that?! What would I buy?

THX

reddit.com
u/Puzzleheaded-Law8114 — 3 days ago
▲ 86 r/esp32+2 crossposts

I built a GUI tool to flash ESP32 firmware for factory bulk flashing

Tired of explaining esptool commands to my factory workers every time we needed to flash devices, so I built a desktop app that handles everything automatically.

What it does:

- Auto-detects Python and esptool on startup — installs esptool via pip if missing

- Auto-detects ESP32 devices by USB vendor ID (CP2102, CH340, FTDI, native USB)

- One-click flash with progress bar and live esptool output

- Factory mode — plug in a device, it flashes automatically, unplug, plug next one, repeat indefinitely

- Works on Mac and Windows

- Dark theme

Built with: Java 17 + JavaFX + jSerialComm

I'm building IoT energy monitoring devices (ESP32-C6 based) and needed something my factory floor team could use without any technical knowledge. Figured others might find it useful too.

Open source, MIT license: https://github.com/AjinkyaGokhale/esp-flasher-java

Feedback welcome — especially if you test it and find any bugs!

u/Express_Ad8866 — 3 days ago
▲ 52 r/esp32

IIIF on ESP32: countless artworks for free

IIIF is how major museums expose their image collections online for free. You can specify an image resolution, and the server produces JPEG files on demand. It's pretty neat.

So I brought it to p3a, my ESP32-P4 pixel-art frame. Hundreds of thousands of artworks from six institutions now stream straight to the device:

- Art Institute of Chicago

- Rijksmuseum (Amsterdam)

- Victoria & Albert Museum (London)

- Wellcome Collection (London)

- SMK / Statens Museum for Kunst (Copenhagen)

- Harvard Art Museums

IIIF itself is standardized, but each museum's discovery layer is idiosyncratic. AIC has its own search API, Rijks needs a Linked-Art resolver walk, Harvard needs a BYOK key... so each museum gets its own dispatcher.

p3a runs on the Waveshare ESP32-P4-WIFI6-Touch-LCD-4B (720×720 24-bit IPS). It plays animated WebP/GIF, static PNG/JPEG, and connects directly to Makapix Club and Giphy. Links are in the comment below.

u/fabpub — 3 days ago
▲ 43 r/esp32

Benchmarking SD-Cards with ESP32

I've done some benchmark with SD cards, using self-rigged uSD modules in 4-bit mode.
So far, i managed to get around 5MB/s Read and Write with 32GB Sandisk HC1. Other card brands were much slower. Test done with Arduino for now. Next test with ESP-IDF.
Anyone here wants to share his results?

u/420xpert — 3 days ago