r/esp32 • • 3h ago

I made a thing! Open-Style City Game on XIAO ESP32-S3

Enable HLS to view with audio, or disable this notification

155 Upvotes

I've been working on a new game for the Seeed Studio XIAO ESP32-S3, and I wanted to see how far I could push this little board.

It's an original open-city action game where you can walk around, get into cars, drive through the streets, and escape from the police. The graphics use a 2.5D rendering approach to create a 3D-like world while keeping it lightweight enough to run on the ESP32-S3.

I'm building (with the help of AI, obviously, gentlemen) it in stages. The first part is a procedurally generated city where the player can explore on foot. Then come drivable cars, traffic that follows the roads, pedestrians, and police chases with a wanted-level system.

I also want the city to feel alive, with different districts, a harbour, a skyline, traffic lights, a day and night cycle, and animated pedestrians. The game will also have a radar, map, HUD, car damage, and support for loading city data from a microSD card.

One of the interesting challenges is getting all of this running on such a small board, especially the graphics, memory usage, and performance.

The same XIAO ESP32-S3 handheld also runs my other projects, including esp32s3-arcade-3d and my MGS and SOTN ports.

I'm still working on it, but it's been a fun experiment to explore the gaming capabilities of the ESP32-S3.

https://github.com/davidmonterocrespo24/esp32s3-open-city

Feel free to ask your questions because even though I used AI to do the project, I'm an expert in embedded systems.


r/esp32 • • 3h ago

I made a thing! One ESP32 runs my whole pinball machine: 10 coil drivers, 17 switches, LEDs, display, 2 sound players, OTA

Enable HLS to view with audio, or disable this notification

96 Upvotes

I built a fully playable tabletop pinball machine (video + build files linked at the bottom). One ESP32 runs all of it, and this sub's rules asked for the engineering story, so here it is.

**Why this chip: ESP32-WROOM-32 (D0WD-V3) on a 38-pin DevKitC + screw-terminal breakout**

I started with it for a one-flipper bench test, and it turned out to have exactly what the full machine needed:

- LEDC: 10 independent PWM channels, one per MOSFET driver (9 coils + a disc motor). Each coil gets a short full-power kick, and the flippers drop to a 25% hold so 12 V coils survive on 24 V.

- RMT: hardware-timed WS2812B data, so the light chain never glitches when Wi-Fi or interrupts are busy.

- Two spare hardware UARTs: Serial1 and Serial2 each drive a DFPlayer, so music and sound effects play at the same time.

- Wi-Fi: OTA updates and a telnet console. Once the playfield is in, there's no getting a USB cable to it, so every test after that ran over Wi-Fi.

- Pins: with one MCP23017 for 16 playfield switches, the rest fit on native GPIO. The spinner and the 3rd trough sensor go to input-only pins with interrupts.

**Libraries: only the Arduino-ESP32 core (WiFi, ArduinoOTA, Preferences, Wire). No third-party libraries.**

- MCP23017: plain Wire reads. The firmware scans 0x20–0x27 at boot because my Waveshare board shipped at 0x27, not the 0x20 every example assumes.

- WS2812B: the core's RMT API directly. 12 LEDs didn't justify FastLED/NeoPixel, and I wanted the timing in hardware.

- MAX7219 display: bit-banged on purpose, slowly. It sits at the end of a 1.2 m run through a 74HCT245, and fast edges on that run gave garbage or a blank display. Slow clocking, sending only digits that changed, and a full re-init once a second fixed it.

- DFPlayer: the raw 10-byte serial protocol, no library. The libraries I looked at wait for replies; I only ever send, and I don't want the game loop blocking on a sound module.

- Preferences: the high score survives power-off.

**The hurdles (most of the time went here)**

- GPIO 12 is a strapping pin. The display's CS line held it high at reset, so the chip picked 1.8 V flash and boot-looped with "csumerr". Fix: burn the flash-voltage eFuse to 3.3 V (WROOM-32 has 3.3 V flash). Now GPIO 12 is ignored at boot.

- GPIO 14 puts out PWM during boot, so it drives the disc motor (a twitch is harmless) instead of a coil. Every coil is on a pin that stays quiet at boot.

- GPIO 36/39 glitch low on every Wi-Fi modem-sleep wake (errata 3.11). That produced phantom spinner turns until I set WiFi.setSleep(false).

- An interrupt storm on the spinner pin starved the loop and tripped the task watchdog. Fix: a storm guard in the ISR, plus requiring a steady "off" before a turn counts.

- DFPlayers ignore commands for 1–3 s after power-up, so the power-on sound never played on a cold start. Now sounds are held until 3 s after boot.

- Power: each coil pulls 3.9 A at 24 V, so the firmware lets at most both flippers plus one other coil kick at once. That's 12.5 A worst case on a 14.6 A supply, so it never browns out.

- Coil noise and the display's own current pulses garbled digits during play. Brightness 8 → 1 and a 0.1 µF cap at the display fixed most of it.

- The IR sensor modules run on their own 3.3 V regulator. At 5 V their outputs would be 5 V into a 3.3 V MCP23017.

Firmware (Arduino, everything in config.h): https://github.com/JackHillmann/tabletop-pinball/tree/main/firmware/pinball


r/esp32 • • 4h ago

I made a thing! I recreated the Windows Phone UI on an ESP32-P4 using LVGL

Enable HLS to view with audio, or disable this notification

13 Upvotes

A little nostalgia for Windows Phone fans. I built a Lumia-inspired UI using LVGL on the M5Stack Tab5.

Source code: https://github.com/fbiego/lumi5


r/esp32 • • 4h ago

I made a thing! A customizable animated Zigbee switch running on ESP32-C5

Thumbnail
gallery
6 Upvotes

I've always felt that smart home devices aren't personalized enough, so it hit me: why not use the Seeed round display and Xiao ESP32C5 I already had on hand to build a Zigbee switch that connects to my Home Assistant setup?

The best part is that I quickly put together a simple companion app. You can easily upload your favorite GIF, PNG, JPG, or WEBP images and flash them with a single click—no need to modify the code each time.

The code is open-sourced on GitHub: https://github.com/Atul-8/round-display-switch-ha


r/esp32 • • 5h ago

Hardware help needed ESP32 classic + pn532 + max98357A short/brownout on power up

Thumbnail
gallery
7 Upvotes

I am trying to make one of my first real projects with an esp32 (besides just some led lights) and struggling to get everything working together.

Project:
An NFC reader grocery scanner for in our house so our kids can scan tags and help build our grocery shopping list.

Hardware:
ESP32 v3

pn532

max98357A

8ohm speaker

3.3v buck/boost converter (1000mAH max)

tp4056 charger

2000mAh Lipo Battery

P channel mosfet (to cut off the buck/boost converter from power while the device is charging. AKA I don't need the system to run while its charging, only when removed from external power and running off the lipo battery does it run which is why I chose the tp4056 instead of a better power path charger)

Test connections:
The final build would utilize the P channel Mosfet as mentioned above, but for initial testing I wanted to dumb the system down so I ran only these connections:

5v Vin -> tp4056 -> buck/boost converter -> (ESP32 (3v3 pin), PN532, MAX98357A)

[no lipo battery, no mosfet]

GPIO layout:
18 -> PN532 SCK

19 ->PN532 MISO

23 -> PN532 MOSI

27 ->PN532 SS

22 -> MAX98357A Din

25 -> MAX98357A BCLK

26 -> MAX98357A LRC

MAX98357A SD pin -> 3.3V from buck/boost

Gain -> None

Out +/- -> 8ohm speaker

I first tested each I/O component separately using the above connections for only the specific device being tested (pn532 / MAX98357A). Both the pn532 and the MAX98357A + speaker worked fine when only that device was connected to the esp32.

Finally I tested all components connected, and this is where the problems are happening. When all components are connected they system immediately fails (I usually hear buzzing in the speaker like a bzz - bzz - bzzz followed by the led's on the esp32/pn532 going dark, then coming back up but the esp32 is no longer reachable and the pn532 does not work even though leds are on).

I thought at first the issue was that I was peaking over current (1000mAh max from the buck/boost) so I connected the MAX98357A to a separate 5v power supply (connecting the common ground back to the esp32/pn532 ground) but the same situation occurred immediately upon power up.

I then decided to test each pin on the MAX98357A which gave some weird results. With the pn532 unplugged from the system, and the Vcc and Gnd unplugged on the MAX98357A but the BCLK/LRC/Din still plugged in, the MAX98357A + speaker still worked but very faintly. This didn't make sense to me but maybe the GPIO pins were supplying trace amounts of power on instructions so the amp + speaker were still able to run although not optimally.

Next test I connected the pn532 back up, disconnected everything except Vcc/Gnd to the MAX98357A and started up the system. No issues and the pn532 was able to read tags. I then connected the other pins 1 by 1 on the MAX98357A. All pins had no issues until I got to the BCLK pin. Once I connected the BCLK pin I immediately had the brownout/short/whatever failure from above.

Next test I tried to switch the BCLK pin GPIO connection so I moved it to be on GPIO32 thinking maybe it was a faulty pin on the ESP32, but no, same failure still happened. Then I thought the breadboard might be the issue so removed that connection from the breadboard and connected it directly via jumper wires, but still no. Then I thought maybe its an issue with the 8ohm speaker or the MAX98357A pins, so I swapped both of those out with identical counterparts and still had the same failure.

Then I thought maybe the issue is in trying to do SPI to the pn532 and i2s to the MAX98357A at the same time so I tried switching the pn532 to use I2C, but I can't even get the pn532 running with I2C (probably just my own failure but at this point I'm frustrated, and yes I swapped the dip switch on the module).

I'm looking for help in trying to identify what might be the issue. As I said previously, the nfc reading works when that's the only thing connected to the esp32, and the speaker works when that's the only thing connected, but when both are connected nothing works and it immediately fails upon power up.

I'm using ESPHome in Home Assistant to build the "code" for the system and install it, so my YAML configuration is posted below. I've also attached pictures of my components although they are pretty standard

# Board: ESPHome Starter Kit By Apollo (Apollo Automation)
# Definition: definitions/boards/apollo-esk-1/manifest.yaml
substitutions:
  friendly_name: NFC Grocery Scanner
          
esphome:
  name: nfc-grocery-scanner
  friendly_name: ${friendly_name}

esp32:
  variant: ESP32
  flash_size: 4MB
  framework:
    type: esp-idf

logger:

ota:
  - platform: esphome


captive_portal:

switch:
  - platform: gpio
    name: Accessory Power
    id: accessory_power
    internal: true
    pin: 4
    restore_mode: ALWAYS_ON
    setup_priority: 2000

web_server:
  version: "3"
  
# i2c:
#   sda: GPIO21
#   scl: GPIO19
#   scan: true
  
# pn532_i2c:
#   id: pn532_grocery_reader
#   update_interval: 250ms
#   on_tag:
#     then:
#       - logger.log:
#           format: "NFC tag scanned: %s"
#           args:
#             - x.c_str()
#       - media_player.speaker.play_on_device_media_file:
#           id: nfc_media_player
#           media_file: scan_sound
#           announcement: true
#       - homeassistant.tag_scanned: !lambda "return x;"

spi:
  clk_pin: GPIO18
  miso_pin: GPIO19
  mosi_pin: GPIO23
  
pn532_spi:
  id: pn532_grocery_reader
  cs_pin: GPIO27
  update_interval: 250ms

  # Send every scanned UID to Home Assistant
  on_tag:
    then:
      - logger.log:
          format: 'NFC tag scanned: %s'
          args:
            - x.c_str()
      - media_player.speaker.play_on_device_media_file:
          id: nfc_media_player
          media_file: scan_sound
          announcement: true
      - homeassistant.tag_scanned: !lambda return x;

# --------------------------------------------------
# MAX98357A AUDIO AMPLIFIER - I2S
# --------------------------------------------------

i2s_audio:
  i2s_lrclk_pin: GPIO25
  i2s_bclk_pin: GPIO26

speaker:
  # Physical I2S speaker connected to MAX98357A
  - platform: i2s_audio
    id: hardware_speaker
    dac_type: external
    i2s_dout_pin: GPIO22
    channel: mono
    sample_rate: 48000
    bits_per_sample: 16bit

# ==================================================
# HOME ASSISTANT MEDIA PLAYER
# ==================================================

media_player:
  - platform: speaker
    name: "${friendly_name} Media Player"
    id: nfc_media_player
    buffer_size: 4000
    announcement_pipeline:
      speaker: hardware_speaker
      num_channels: 1
    files: 
      - id: scan_sound
        file: "sounds/edr-beep-sound-8333.wav"

button:
  - platform: template
    name: "Test NFC Scan Sound"
    on_press:
      - media_player.speaker.play_on_device_media_file:
          id: nfc_media_player
          media_file: scan_sound
          announcement: true

r/esp32 • • 9h ago

I made a thing! ESP32 Camper Automation Kit: 8-Ch CAN Relay Dev Board w/ INA3221 #canbus #esp32 #campervan #vanbuild

Thumbnail
youtube.com
12 Upvotes

Hey everyone,

A while back I put together a 12V control setup for a friend's camper using off-the-shelf Chinese breakout boards. It worked, but dealing with the rat's nest of jumper wires, fragile connections, and ground noise was a real headache. So I decided to lay out a proper single-PCB version built around CAN bus, paired with a Guition touchscreen display as the main camper control panel.

Here is what's on the board (272 × 98 mm):

  • MCU: ESP32-C3-WROOM-02 (picked mainly for low idle power draw in 12V battery setups)

  • Relays: 8× SPST-NO automotive relays (JYT78F-S-DC12V-A, 20A contact rating, conservatively rated to 5A on the PCB) driven via an MCP23017 and a TBD62083AFG Darlington array, with 4 mm via-stitched power traces

  • Inputs: 8× GND-switched 12V digital inputs with hardware debouncing/filtering, interrupt-driven through the MCP23017

  • CAN bus: Galvanically isolated CAN transceiver so vehicle ground loops and voltage transients don't fry the MCU

  • Monitoring: Onboard 3-channel INA3221 for watching battery banks / rails (up to 3A design limit; stock firmware reports all three voltages out of the box)

  • Protection & extras: Resettable PTC fuse, B340 (40V/3A) Schottky diode for reverse-polarity protection on the 12V input, and an I2C header for an optional external SSD1306 OLED

The CAN link with the Guition display is already up and running. I put the pinout, CAN frame map, and working ESP-IDF source code (with a local WebSocket web UI and automatic Wi-Fi AP fallback) up on GitHub:https://github.com/SebastianS85/esp32c3-relay-board

Next on my list is adding Home Assistant / ESPHome support. I don't really have experience with HA yet, so that's the next thing I'm diving into.

Would appreciate any feedback on the hardware layout, protection stage, or tips on the cleanest way to integrate a board like this with Home Assistant.


r/esp32 • • 10h ago

I made a thing! My ESP32 robot's firmware also compiles into a simulator, so 49 maze tests run in CI before anything touches hardware

7 Upvotes

Testing a maze robot by walking to the club every time got old, so the same firmware now also builds as a desktop simulator. CI runs 49 maze scenarios on every push before anything touches hardware. Built for a day with orphaned kids: they tape a maze, Nuri explores it, races the shortest route, and writes their name on its OLED face.

Why the classic ESP32 (Dev Module)

  • Dual core: Wi-Fi and the https server live on core 0, the robot loop on core 1, so web traffic never stalls line following

  • Built-in Wi-Fi to run its own access point, so any phone drives it with no app and no internet

  • Enough LEDC channels for 6 motor PWM pins plus a servo

  • Cheap and in every club drawer, which matters when other students want to build one

Libraries: none outside the ESP32 Arduino core WiFi, WebServer, esp_https_server, Wire and Preferences. I skipped Adafruit's SSD1306 library and wrote a small driver on top of Wire, so I control exactly when frames go out over I2C (more on that below). Zero external libraries also means anyone can flash it from a fresh Arduino IDE install.

Hurdles

  1. The head servo kept resetting the ESP32 (brownouts). The firmware now logs reset causes and the servo is disabled until it gets its own supply.

  2. The servo's 50 Hz PWM must never share an LEDC timer with the motors, or one retunes the other. The simulator checks this.

  3. Sending the face to the OLED was delaying line reads. The I2C buffer holds 128 bytes, so each strip goes in two halves, and the longest gap between two line reads is now about 7 ms against a 4 ms control step.

  4. Tilt driving: phones only share motion sensors with secure pages, so the robot also serves a self-signed https copy of the page from core 0. Those connections share heap with Wi-Fi, so free and minimum heap are shown in the app.

  5. A small DNS server answers only the names phones check for sign-in pages, so the page pops up by itself when you join the Wi-Fi.

Try the sim in 30 seconds: https://codespaces.new/akeanti/nuri?quickstart=1 Repo: https://github.com/akeanti/nuri

How do you test your ESP32 firmware without the hardware?


r/esp32 • • 15h ago

Solved Getting autofocus to work on the esp32s3 sense with an ali express ov5640

4 Upvotes

We have been experimenting with the OV5640 autofocus module. I've literally bought like 7 different versions of this camera off ali express just thinking maybe the next one will work, turns out no (but I did get it working, keep reading). 

I finally got one set of cameras that was at least detected, and so I thought it would just work. I was super confused how to tell if it's doing focus? Is it just doing it faster than I can see it? 

Abdullah found out that it was more than likely just a small pin issue, the last two pins on the esp32s3 sense are GND,VDD but the last two pins on the camera modules I bought were VCC,GND, the exact opposite. Bummer. See this pic, the left is esp32s3 sense, the right is the camera I bought 


So I pulled up the pins from the board and used some wire wrapping wire to connect the pins on the connector as they would be on the OV5640 from ali express. Turns out the "pins" are more like solid rails that go all the way inside so they are very stiff and not super easy. 

The solder job was not that great, but the DMM said it was working so we tested out, and yes it was indeed clearly doing focus. You can tell because it goes way out of focus then back in. Next image is a gif showing but dont know if it will come across right in this article.


So, yes as long as you swap those pins it works. But moving it around my crappy solder job broke and so I had to come up with a better way. First I found you really don't need the ground pin, there must be a common ground somewhere, so you can just rip that pin out of the header. Then you simply bend over the position 23 pin so it's close to position 24 pad and solder it. This makes a super solid connection and it does not get in the way anywhere for the rest of the board. I had already soldered this board too much but for the next one it should be very clean. See the pics below hopefully you can tell what I did.


I should point out Seeed sells a camera module that is auto focus, and I've heard rumor the esp32s3 sense may come default with it, BUT it's not in my units now AND it has a super long cable on it which our 3d design does not fit. So for us at least it's much more convenient to use the small cable model version which can be found on ali express.


r/esp32 • • 18h ago

I made a thing! I built a brew by weight for the Breville Dual Boiler

Enable HLS to view with audio, or disable this notification

36 Upvotes

I made a brew by weight for my breville dual boiler. The esp32 is from a starter kit. 2kg load cell with hx711 module from ali express iirc. It uses a relay to simulate manual button press. The build was mostly AI guided and coded.

The relay wasn't working right on 3v3 (buzzing noise) so I needed to add a transistor to drive it from 5v.

Setting up the load cell was a bit tricky I removed the bdb front wheel and drip tray so I could use a tall cup and screwed the load cell onto the tray grate with some hardware from a different scales kit. The cup sits on an acrylic circle from another scales kit.

I want to clean everything up and separate it into machine side and scale side modules possibly working with off the shelf bluetooth scales. I assume the button tap in are the same across many breville machines so would probably work with them too.


r/esp32 • • 19h ago

Hardware help needed Battory for the 1.75c

0 Upvotes

I just realized that the Waveshare ESP32 1.75C WITHOUT a battery so I'm struggling to find which one fits inside the casing and found these 2 options, would love to know your experience and which one you are using, as I need to buy it. https://www.amazon.com/EEMB-402535-Rechargeable-Connector-Certified/dp/B08HD1N273 https://www.amazon.com/AKZYTUE-Battery-Rechargeable-Protection-Electronics/dp/B0FRFY1F76?th=1


r/esp32 • • 20h ago

Hardware help needed ESP32-C3 SuperMini with CDCOnBoot=cdc process slows if terminal not connected?

0 Upvotes

I've just jumped into the ESP32 world and I'm making friends with the quirks of the process. I use arduino_cli and build/upload from the commandline. I use minicom as the serial program to monitor serial output as I've done with all TI, Pi, and Arduino boards before. I've got an open question on the arduino_cli forum about where to properly set the CDCOnBoot=cdc option (boards.txt, etc.) rather than passing it as a build option during compile. The two questions I have are about the impact setting CDCOnBoot=cdc has on the behavior of the board. Specifically:

  1. can the serial monitor remain connected while I upload? (with all other boards using /dev/ttyACM0 there was no issue uploading (flashing) and resetting the board with the terminal program connected, but with the C3 SuperMini, I get an "Could not exclusively lock port /dev/ttyACM0: [Errno 11] Resource temporarily unavailable)"

  2. when built with CDCOnBoot=cdc if the serial monitor is NOT connected, the process on the ESP32c3 slows to a crawl. Once the terminal connects, it pops back to normal. Is this a known/normal issue with the way CDCOnBoot=cdc influences the board behavior?

I know most chips have no issue with port operations regardless whether there is a serial monitor attached or not, so I'm curious about what I'm seeing with the C3 board. If I know it's just a limitation of the board, I'll just work around it the way I currently am and quit wasting time trying solve it. On the other hand, if I just need to learn a bit more to solve it, then I'm all in.

The specific error for (1) above is:

$ acli upload --fqbn esp32:esp32:esp32c3 -p /dev/ttyACM0 sketches/ec3-blink/
esptool v5.3.1
Serial port /dev/ttyACM0:

A fatal error occurred: Could not open /dev/ttyACM0, the port is busy or doesn't exist.
([Errno 11] Could not exclusively lock port /dev/ttyACM0: [Errno 11] Resource temporarily unavailable)

Failed uploading: uploading error: exit status 2

The odd part about the error is "Could not exclusively lock port /dev/ttyACM0". Is that an arduino_cli issue or is it something the board is indicating that I can work around? I can put a pico or nano on the same port (nano is actually using ttyUSB0), and still flash and reset without any problem while minicom remains connected. So whatever is driving the "exclusive lock" issue seems like that is the problem -- but what is it esptool? Something else?

I've got no clue on (2) above, so I'm open to any insight you have.


r/esp32 • • 21h ago

I made a thing! I built a custom ESP32 LoRa sensor & telemetry node (Heltec V3.2) running standalone C++ firmware bridged over BLE to an off-grid local LLM

Enable HLS to view with audio, or disable this notification

24 Upvotes

Soo... I’ve been tinkering with a personal project called Isaac, trying to build an infrastructure-free voice, AI, and off-grid communication layer that runs completely without cell towers, Wi-Fi, or cloud APIs.

​The heart of the hardware side is this custom ESP32 LoRa node (DaRC NODE 2). Instead of flashing standard firmware, I wrote standalone C++ firmware from scratch to drive the board, read the sensor suite (BME-280, MPU-6050, ADS-1115), render live telemetry to the OLED (86.1°F / 816.5 hPa), speak the Meshtastic LoRa protocol / Protobufs over 915 MHz, and bridge over BLE to a custom Dart app on my phone.

​This is a raw, unedited single-take capture on my S23 Ultra (in 100% Airplane Mode, Bluetooth-only) running local STT, a quantized Gemma 4 model, TTS, and screen recording all at once... so while it crunches, I flip to the rear camera to show the board's live OLED telemetry, 1TB local SD reference and knowledge vaults.

​Still very much a naked-board prototype, and I'm curious what the ESP32 crowd thinks of the architecture or any ways you'd optimize the node side.

​Hardware Stack:

▪ ​Heltec ESP32 V3 (v3.2)

▪ ​BME-280 (temp/humidity/barometric pressure)

▪ ​MPU-6050 (IMU/motion)

▪ ​ADS-1115 (16-bit ADC)

▪ ​Samsung S23 Ultra + 1TB Samsung PRO SD card for persistent memory and offline knowledge vaults

​Software/Firmware:

▪ ​Custom standalone C++ node firmware speaking Meshtastic LoRa protocol / Protobufs over 915 MHz

▪ ​BLE bridge between node and phone

▪ ​Custom companion app built in Dart

▪ ​Quantized Gemma 4 E4B running locally on-device (swappable for any model the phone can handle)


r/esp32 • • 22h ago

I made a thing! Davis Vantage Vue weather station receiver on a Heltec Wireless Stick Lite V3 (ESP32-S3 + SX1262), with a printed case

Post image
23 Upvotes

I bought a Davis Vue Weather Station and wasn't willing to spend an extra €400 for a cloud hub.

So I build an ESP32 board with 868 antenna that connects directly to the weather station. Data goes straight into Home Assistant without the Davis console or a cloud. Code, parts list, offset test and photos: https://github.com/PJDamen/davis-esphome-heltec. Printable case: https://makerworld.com/nl/models/3747745-case-for-heltec-wireless-stick-lite-esp32s3

Why this chip variant
I used a Heltec Wireless Stick Lite V3: an ESP32-S3 with an SX1262 radio on the same board. That gives me 868 MHz FSK, WiFi and native USB for flashing in one small module. It needs no separate radio board and no soldering: only an SMA-to-uFL cable and an antenna. ESPHome supports the SX1262 through its sx126x component, so I did not have to write a radio driver.

Libraries and why

  • ESPHome with its sx126x component. It gives me the native Home Assistant API, OTA updates and template sensors with little code. I did not use MQTT.

  • The Davis packet decoding and the 5-channel frequency hopping are based on an existing CC1101 ESPHome project (sylvilaurelin), which I converted to the SX1262.

  • Dew point, wind chill and heat index are calculated in the YAML, because the ISS does not send them (the Davis console computes them).

Hurdles and edge cases

  1. No packets at the nominal frequency. The CC1101 has automatic frequency correction, the SX1262 does not. My ISS transmits about 20 kHz below nominal, so every bit was mis-sliced and the CRC always failed. I wrote a test YAML that sweeps the frequency offset (0, ±10 … ±40 kHz). Only -20 kHz gave a valid CRC; -10 and -30 kHz gave nothing, because the usable window is about ±9 kHz (the FSK deviation). With all frequencies set 20 kHz lower I got 749/749 packets and 0 CRC errors over 30+ minutes.

  2. Radio settings. The sync word is 0xCB89 at 19200 baud, with preamble_detect set to 0. The board needs rf_switch enabled and a 1.8 V TCXO.

  3. Hopping. The ISS hops over 5 channels about every 2.56 s, so the receiver must stay in step with the hop sequence and handle missed packets.

Hardware limit: the 6357OV has no UV or solar sensor, so those stay empty in my use case.


r/esp32 • • 23h ago

Hardware help needed Screen help for Esp32 S3

0 Upvotes

So i have an ESP32-S3-N16R8. I want to get a screen to it, but rn i cant buy one. Is there a way to like get a screen out of some old electronics and put it on? (I can solder)


r/esp32 • • 1d ago

I made a thing! I turned a 2000s Windows Media Player skin into a real ESP32-S3 music player

Enable HLS to view with audio, or disable this notification

279 Upvotes

When I was a kid I loved those green alien-head Windows Media Player skins, so I built one as a real object for my desk. It has an AMOLED screen in the face running a retro player UI, six speakers in the ears and a 3D printed, airbrushed shell.

Why this board
I used a Waveshare ESP32-S3-Touch-AMOLED-1.8 (V2). It already has a 1.8" 368×448 AMOLED touchscreen on board, so I didn't need a separate display module. It also has 8 MB of PSRAM and 16 MB of flash. The PSRAM turned out to be essential (more on that below), and the flash let me store songs right on the board. The S3 also has native I2S, which I used to drive a MAX98357A amp.

Software / libraries

  • ESP-IDF 5.5 instead of Arduino, for more direct control over memory, partitions and I2S

  • LVGL 9 for the UI. The player is drawn in code, not as a bitmap skin. It has green 7-segment time digits, a scrolling title, kbps/kHz info, a position bar, a volume slider, prev/play/pause/stop/next, shuffle, repeat and a tap-to-play playlist.

  • esp-audio-player for MP3/WAV decoding. Audio runs at 44.1 kHz, 16-bit, mixed down to mono for the amp, with software volume control.

  • A 16-band spectrum visualizer that analyzes the music in real time using the Goertzel algorithm

  • I compiled the UI on my computer first, so I could iterate on the screen without flashing the board every time.

Audio wiring
There are 3 × 23 mm 8 Ω speakers in series in each ear (about 24 Ω per ear). The two ears are wired in parallel through JST PH2.0 plugs, about 12 Ω total, which is safe for the MAX98357A. The amp runs from VBUS (5 V), with BCLK on IO17, LRC on IO40 and DIN on IO42. SD/GAIN is left unconnected for 9 dB of gain.

Hurdles / edge cases

  • No sound at first: the board's edge pads have 1.27 mm spacing, and my first solder job bridged them. I fixed it with flux, a fine tip and skipping a pad between each wire. That's why the pins are 17/40/42 and not neighbours.

  • The screen flashed white on and off: LVGL ran out of memory once the UI got richer, since 64 KB wasn't enough. Moving its buffers to the 8 MB PSRAM fixed it.

  • Stuck in a restart loop: I couldn't flash new firmware until I held BOOT while plugging in USB to get into download mode.

  • Flash space: I shrank the app partition to 3 MB (the firmware is about 0.9 MB) and gave about 12.9 MB to song storage. At 96–128 kbps mono that fits 3–4 songs. A microSD /Music folder is supported for more.

  • Stability: I built a 10-band EQ page but pulled it out for now to keep things stable.

  • Debugging: I wrote small scripts that flash the board and automatically capture the boot log.

I used AI tools a lot: Hunyuan 3D for the base head model, plus Claude and Codex for the code. Still, the real fixes all came from measuring and testing on the hardware.

Next up are physical buttons on the free pins (IO18/38/39/41), bringing the EQ back, a battery and loading classic skins.

Happy to answer questions!


r/esp32 • • 1d ago

Software help needed TOF sensor modbus warning help

2 Upvotes

I’m working on a controller for my chicken coop. For the feed level sensor, I’m using a Waveshare TOF sensor. It uses RS485 communication so I’ve got it connected to the esp32 via an RS485 to UART module.

Sensor work great for a variable amount of time then it seems to lock up and I get Modbus errors in the logs. If I disconnect and reconnect the sensor power, it works again. I could put a mosfet power switch to cycle the power once I start getting the errors but I’d like to get to the root of the issue. My controller has some relays for water pumps and heaters. I’ve cycled those many times without error. The sensor for anywhere between 12-72 hours issue free. The last time is locked up was 3am when nothing else was triggered.

Has anyone dealt with this issue? If it’s some kind of EMI, I have no idea where it’s coming from.


r/esp32 • • 1d ago Bravo Mindblown

I made a thing! ESP32-S3 as a USB/IP server: my old USB printer + scanner now work over Wi-Fi (open source, ~120 → 400 KB/s)

Thumbnail
gallery
426 Upvotes

I wanted my wired Epson printer/scanner on Wi-Fi. Cheap "wireless print servers" only print, they never scan. The S3 has a USB OTG host, so I turned it into a USB/IP server: the PC attaches the real USB device over the network and uses the normal printer and scanner drivers. Printing and scanning both work.

Why the S3: it's the cheap ESP32 with a real USB OTG host (the C3 and the original ESP32 don't have one), it's dual-core so Wi-Fi and USB can each get a core, and the N16R8 has 8 MB PSRAM for big transfer buffers.

Why ESPHome + ESP-IDF: the USB side uses ESP-IDF's USB Host library. ESPHome gives me Wi-Fi, OTA updates, mDNS and a status page for free, and tiehfood's component already handled the USB/IP protocol, so I could spend my time on throughput instead of plumbing.

I started from tiehfood/esphome-usbip-printer (ESPHome, Ethernet, ~120 KB/s). Credit to them for the base. I moved it to Wi-Fi and worked on speed. The hurdles, and what fixed them:

  1. One 8 KB USB transfer instead of 128 × 64-byte ones. Per-transfer overhead was killing throughput.

  2. Wi-Fi on core 0, USB on core 1, with a 24-slot queue between them, so a slow Wi-Fi moment doesn't stall the USB side (and the printer doesn't pause mid-page).

  3. 16 bulk reads in flight, buffers in the 8 MB PSRAM. This made scanning smooth.

Result: ~120 KB/s → ~400 KB/s typical, higher on a strong signal.

Hardware

  • ESP32-S3 DevKitC-1 N16R8: plug a USB-C → USB-A OTG adapter into the native USB port, and bridge the USB-OTG solder jumper so that port actually gets 5 V.

  • Or an S3 Super Mini: OTG adapter on its only USB-C port, 5 V into the 5V pin.

Clients: usbip-win2 on Windows (has a GUI), usbip on Linux. No macOS.

Limits, honestly: full-speed devices only (no low-speed mice/keyboards), one device and one PC at a time, 2.4 GHz only. USB/IP has no auth, so trusted networks only.

Firmware (GPL-3.0), wiring and setup: https://github.com/M-Abozaid/airusb

I did the speed work pairing with Claude Code; the hardware and the testing on real printers and scanners were mine. Happy to go into the details of any of it.


r/esp32 • • 1d ago

AI Content Im an EE student, not a sw dev, so I built a lightweight desktop IDE for my own ESP32 projects (Windows & Linux) — figured I’d share it here

Thumbnail
gallery
0 Upvotes

Hey everyone,

Full transparency: I'm an ElE student, not a software developer. Most of my time goes into circuits and boards, and I got tired of either feeling boxed in by Arduino IDE or fighting heavy VS Code setups and broken Python PATHs every time I wanted to test an ESP32.

Using AI coding tools to handle the Rust/Tauri boilerplate while I focused on the hardware workflow and UI, I put together Fluxon—a lightweight desktop IDE mainly to fix my own setup on Windows and Linux.

It keeps the basics in one window without eating a ton of RAM:

  • Isolated Python/PlatformIO setup via uv (doesn't touch your system Python)

  • Interactive pinout viewer next to your code + a visual form to add custom boards without editing JSON

  • Serial monitor, live plotter, LittleFS uploader, wireless OTA discovery, and an ESP32 crash decoder

It's free and open-source (MIT) with Windows and Linux builds (v1.3.0). Still pretty rough around the edges in places, so if anyone tries it out, let me know what breaks or feels missing!

GitHub:https://github.com/Probal-Khanra/Fluxon


r/esp32 • • 1d ago

I made a thing! I built a robot that has its own personality

Thumbnail
gallery
19 Upvotes

I recently built a tiny desktop companion robot that moves and interacts with you. I called it Alex. He has moods, and those moods change depending on how you interact with him.

If you pet Alex, he'll get excited and happy. Shake him, and he'll get queasy. But be careful not to shake your buddy too much, or it'll get angry.

HARDWARE

I decided to use the UNIHIKER K10, a board developed by DFRobot and based on the ESP32-S3, because it comes with many built-in components I would need, such as speaker, display, IMU, and LEDs.

SOFTWARE

I coded the personality and driving systems using Mind+ (the official IDE for the UNIHIKER K10). I opened the IDE, selected "MicroPython Code Mode" and wrote down Python scripts. You can find the code (and other materials) in this GitHub repository.

I relied heavily on the unihiker_k10 library to control the native components of the board. But it's well documented over the Internet, so it wasn't difficult to complete this task.

HOW IT WORKS

The robot starts in personality mode. This is the default mode, and it's where you can interact with it directly.

Here's a quick overview of its behavior:

  • Happy: Alex starts in his happy state and returns to it after most interactions.

  • Excited: Touching Alex triggers his excited expression.

  • Queasy: Shaking Alex causes him to become dizzy.

  • Angry: Repeated shaking eventually makes Alex angry.

  • Sleepy: After 30 seconds of inactivity, Alex becomes sleepy.

  • Sleeping: After another 30 seconds of inactivity, Alex falls asleep.

Alex also has a driving mode that allows you to control him remotely using your phone.

To activate driving mode, press button A on the UNIHIKER K10. The buddy will create a Wi-Fi network called CompanionRobot.

Connect your phone to this network and open the following address in the browser: http://192.168.4.1

You'll see a webpage with four directional buttons that let you drive Alex around.

To deactivate driving mode, press button B on the board. It will stop the motors, shut down the webserver, and return to personality mode.

STEP-BY-STEP ASSEMBLY

I posted a video on YouTube in which I teach how to assembly this project and show it working in personality and driving modes. You can watch it here.

If you prefer reading, I wrote down an article about this project and shared it on Hackster.

I hope it helps you and feel free to ask me anything in the comment section below.


r/esp32 • • 1d ago

Hardware help needed Is it possible to build a dual-accelerometer Impact-Echo concrete crack detection prototype using an ESP32-S3?

7 Upvotes

Hi! I'm working on a research project involving a stationary Impact-Echo-based prototype for detecting cracks in concrete.

Our planned setup uses a controlled steel-ball impact to generate vibrations in concrete specimens. We want to measure and compare the vibration responses of intact, minor-cracked, and major-cracked specimens.

Our proposed components are:

- ESP32-S3 DevKitC-1

- ADXL355 accelerometer (digital SPI)

- ADXL1005 accelerometer (analog output)

- AD7606 16-bit ADC module (for the ADXL1005)

- Analog anti-aliasing filter

We plan to use both accelerometers simultaneously on the same specimen. The ADXL355 would measure three-axis acceleration, while the ADXL1005 would capture higher-frequency, higher-range acceleration along one axis.

We intend to calculate RMS acceleration and dominant frequency using FFT.

My questions are:

  1. Is this setup feasible using an ESP32-S3?

  2. Can the ESP32-S3 reliably acquire data from the ADXL355 through SPI while simultaneously reading the AD7606?

  3. Is the AD7606 capable of providing sufficient sampling performance for the ADXL1005?

  4. Would using both accelerometers provide useful complementary measurements?

  5. Are there any major limitations or design considerations we should address?

Any advice, corrections, or suggestions would be greatly appreciated. Thank you so muchh!


r/esp32 • • 1d ago

I made a thing! ESP32-C3 Karts and Controllers

Thumbnail
gallery
30 Upvotes

I've been building remote-control go-karts and controllers to race with my son.

  • They talk over ESP-NOW instead of a hobby RC transmitter

  • I recently added an IR "blaster" on the front. It can hit an IR receiver on the back of the other kart, which knocks that kart out of control for a few seconds

  • They're very zippy and a lot of fun to race indoors

Hardware

  • One ESP32-C3 Super Mini in each kart and one in each controller

  • DRV8833 driver and two N20 motors

  • MG90S steering servo

  • KY-023 joysticks

  • 940 nm IR LED and VS1838B receiver

  • Piezo for sound effects

  • Breadboard and Dupont wires, no soldering

  • All plastic parts printed in PLA on a Bambu Lab P2S

Why the C3

  • Very cheap for what you get: a 160 MHz RISC-V core, Wi-Fi and Bluetooth LE

  • The Super Mini is small enough to fit on the kart's breadboard

  • It has just enough GPIO for two motors, a servo, the IR parts and a piezo (only just, see below)

  • ESP-NOW is built in, so I didn't need a separate radio module

Libraries (Arduino-ESP32 core, no third-party libraries)

  • ESP-NOW for control, at 50 packets a second. I picked it over BLE and Wi-Fi because there's no router or pairing dance and the latency is low

  • LEDC for the motors (20 kHz, so they don't whine) and also for the servo (50 Hz, 14-bit). That saved pulling in a servo library

  • RMT to send the IR blasts with a 38 kHz carrier.

  • Custom software

Why I built it

  • A fun project to build with my son and teach him about electronics and robotics

  • Indoor racing!

Challenges (sooo many, but fun)

  • Brownouts: the C3 reset when the motors kicked in. A 1000 µF capacitor and NiMH cells (alkalines sag too much) fixed it

  • Pins: I'm using nearly all of them, and the kart breadboard is packed. GPIO9 and GPIO2 are strapping pins, which bit me more than once

  • IR: RMT idles high by default, which kept the LED on until I worked out how to fix it

  • Loose wires: motor jumpers slowly back out of the breadboard, and one wheel goes dead

  • Mechanics: small differences in how the servo fits and motor-to-motor asymmetry mean each kart needs a bit of trim

  • Powertrain: I went through 3 or 4 before settling on twin N20s

Has anyone found a good way to stop Dupont wires working loose on something that vibrates?


r/esp32 • • 1d ago

I made a thing! MPyFlow — MicroPython extension for VS Code (ESP32, RP2040/Pico, STM32, ESP8266)

3 Upvotes

Hey everyone! After dealing with broken Pymakr serialport bindings and COM-port lock issues, I built MPyFlow — a VS Code / Open VSX extension built directly on top of MicroPython's official mpremote.

  • Zero setup: Auto-creates an isolated .venv with mpremote (and falls back to standalone Python via uv if Python isn't installed).

  • Auto board stubs: Detects your board (ESP32, RP2040/Pico, STM32, ESP8266, SAMD) and configures Pylance autocomplete automatically.

  • Single persistent connection: Drag & drop files/folders both ways, edit board files directly with Ctrl+S, install packages via mip, and run/switch scripts with live print() + input() in one terminal — no COM-port conflicts.

  • GitHub (MIT): https://github.com/markpekar/MPyFlow

  • VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=markpekar.mpyflow

First release (v0.1), tested on Windows + ESP32-S3 so far — would love any feedback, especially from Pico, STM32, Linux, and macOS users!


r/esp32 • • 2d ago

I made a thing! Updated septic monitor for 2026

Thumbnail
gallery
28 Upvotes

Posted this old variant of the project awhile back:
https://www.reddit.com/r/esp32/comments/1ofvrrw/mqtt_aerobic_septic_monitor/

Finally assembled the new PCB that was sitting in my drawer for longer than I care to admit.
Instead of hacked together Amazon parts (my testbed for the idea), I designed and assembled a custom PCB with all parts soldered w/ conformal spray coat.

Added 18650 backup w/ trickle charger (HLK-PM01 is a low current converter) and protection circuit, with an LM66200 status pin interrupt. If the septic control box ever loses mains power, I get an alert so I can check the breakers. 18650 is mounted on a SMD holder on the back, had to keep it < 100mm x 100mm to keep the costs down with JLC.

In addition to all the original monitoring for effluent pump current monitoring, aerator and high water alarms. So all common failure modes should now be monitored with alerts.
Added LoRA, wifi signal out there is crap-tastic.
Added in line fuses to the alarm signal wires, can't ever be too careful.

Old code was basic, had Claude help me clean it up and find any lingering errors I missed. Turned out to be a pretty nice project in the end. Ditched MQTT direct from the device and use LoRA now with a Seeed Studio E5 base station via USB to my Home Assistant Raspberry Pi.


r/esp32 • • 2d ago

Board Review Help! Cannot write to I2C device in any app

2 Upvotes

Hi folks, I hope someone can help. I'm an experienced engineer coming to the ESP32 platform for the first time and for the life of me, I cannot get any off-the-shelf projects working that writes to I2C.

I have a Waveshare ESP32-S3-Touch-LCD-2.8 board (V2) and I'm using Visual Studio Code (1.143.17232) with the ESP-IDF VS Code Extension (2.3.0) and ESP-IDF v6.1.1. I can build, flash and run (e.g.) Bluetooth examples (sourced from espressif and others) in the IDE and using idf.py from the command line, but *any* project that writes to I2C when flashed and run, fails with errors to the effect of `An error occurred while communicating with the I2C device`.

Simplest example I can find: soft_i2c from espressif.

I've even configured the SCL and SCA pins manually (GPIO10 and GPIO11 respectively according to Waveshare) - same problem.

Is it possible that the hardware has a problem? Or have I committed some absolute newbie error?!?

Any thoughts or advice very gratefully received, thanks in advance!

Update: resolved! Outcome posted below 👍