Skip to content

feat: add M5Atom Echo/Lite and Atom VoiceS3R (ESP32-S3) board support + multi-board READMEMain#44

Open
simeononsecurity wants to merge 2 commits into
colonelpanichacks:mainfrom
simeononsecurity:main
Open

feat: add M5Atom Echo/Lite and Atom VoiceS3R (ESP32-S3) board support + multi-board READMEMain#44
simeononsecurity wants to merge 2 commits into
colonelpanichacks:mainfrom
simeononsecurity:main

Conversation

@simeononsecurity
Copy link
Copy Markdown

@simeononsecurity simeononsecurity commented Jun 3, 2026

Summary

Adds PlatformIO build environments and firmware support for four additional boards — M5Stack Atom Echo, Atom Lite, Atom Voice, and Atom VoiceS3R (ESP32-S3), plus generic ESP32 DevKit with a piezo buzzer, all validated with real hardware. The original xiao_esp32s3 environment is preserved unchanged.

Justification

The Flock You firmware is a great tool, but until now it was only easily buildable for the Seeed XIAO ESP32-S3. A lot of people already own M5Stack Atom boards or a generic ESP32 DevKit and shouldn't need to buy specific hardware just to get started. Making the project flashable on common, cheap, widely-available boards lowers the barrier to entry significantly, you can grab whatever ESP32 you have on your bench, clone the repo, pick your environment, and be scanning in minutes. The M5Stack Atom series in particular is compact, self-contained, and battery-friendly, making it a natural fit for field use. Adding proper platformio.ini environments means contributors don't have to reverse-engineer build flags; it just works with a single pio run command.

New board environments

Environment Board Audio Tested
xiao_esp32s3 Seeed XIAO ESP32-S3 ✅ preserved (original)
esp32dev Generic ESP32 DevKit Piezo buzzer (GPIO) ✅ hardware-verified
m5atom-echo M5Stack Atom Echo Built-in speaker
m5atom-lite M5Stack Atom Lite NeoPixel LED feedback ✅ hardware-verified
m5atom-voice M5Stack Atom Voice SPM1423 PDM mic / speaker ✅ hardware-verified
m5atom-voices3r M5Stack Atom VoiceS3R (ESP32-S3) ES8311 I²S + NS4150B amp ✅ hardware-verified

Changes

platformio.ini

  • Added [env:esp32dev] generic ESP32 DevKit with passive piezo on configurable GPIO pin
  • Added [env:m5atom-echo], [env:m5atom-lite] — standard ESP32 Atom boards using Adafruit NeoPixel for LED
  • Added [env:m5atom-voice] M5Stack Atom Voice with SPM1423 PDM microphone and speaker support
  • Added [env:m5atom-voices3r] ESP32-S3 with espressif32@6.7.0, qio_opi PSRAM, ARDUINO_USB_CDC_ON_BOOT, and M5Unified@^0.2.2 for ES8311 I²S speaker
  • Added partitions_4mb.csv for M5Stack boards (XIAO keeps original partitions.csv)

main.cpp

  • #ifndef TESTING_MODE guard so -DTESTING_MODE=1 in build_flags works without source edits
  • Adafruit NeoPixel #include guarded for Echo/Lite only VoiceS3R and Voice builds no longer need that dep
  • USE_M5ATOM_VOICES3R hardware block: M5.begin() init, M5.Speaker.setVolume(200), Serial1 mirror skipped (USB-CDC only)
  • USE_M5ATOM_VOICE hardware block: M5Unified speaker init for the original Atom Voice
  • GPIO piezo buzzer support for esp32dev tone()/noTone() on configurable pin
  • M5.Speaker.tone() branches in startupBeep(), newDetectChirp(), and heartbeatBeep() startup plays the SMB World 1-1 overworld riff through supported speakers; piezo boards play simplified tones

README.md

  • New Supported Hardware table with all six environments
  • Per-board pio run -e <env> -t upload and screen monitor commands
  • VoiceS3R-specific section: kill-port-holder one-liner + esptool --before usb-reset fallback for ESP32-S3 native USB-CDC
  • Generic ESP32 piezo wiring notes
  • Testing mode documentation (-DTESTING_MODE=1)

Testing

All boards were field-tested:

  • Generic ESP32 + piezo: boot tone sounds, WiFi promiscuous mode scans channels 1/6/11, Flock OUI detections produce audible chirp on the piezo. Serial JSON output confirmed at 115200 baud.
  • Atom Lite: LED feedback on detection confirmed, serial output verified.
  • Atom Voice: Speaker tones confirmed on boot and detection events.
  • Atom VoiceS3R: Boot tune plays through the ES8311/NS4150B speaker, Flock OUI detections produce two-tone ascending chirp. Serial JSON output confirmed on /dev/tty.usbmodem* at 115200 baud.

Hardware support added
- M5Atom Echo (USE_M5ATOM_ECHO): NeoPixel LED + GPIO25 buzzer
- M5Atom Lite (USE_M5ATOM_LITE): NeoPixel LED, no buzzer
- Atom VoiceS3R (USE_M5ATOM_VOICES3R): ESP32-S3-PICO-1-N8R8, ES8311
  I2S speaker via M5Unified, no RGB LED, button on GPIO41

platformio.ini
- [env:m5atom-echo]: Adafruit NeoPixel, usbserial port, 1.5Mbaud upload
- [env:m5atom-lite]: same board, no buzzer flag
- [env:m5atom-voices3r]: espressif32@6.7.0, esp32-s3-devkitc-1, qio_opi
  PSRAM, ARDUINO_USB_CDC_ON_BOOT, M5Unified@^0.2.2

main.cpp
- TESTING_MODE guarded with #ifndef so build flag can override it
- Adafruit NeoPixel include guarded for Echo/Lite only (no NeoPixel on S3R)
- M5Unified speaker: M5.Speaker.tone() used for all audio on VoiceS3R
  - Startup: SMB World 1-1 overworld riff (E E _E_ C E G)
  - Detection chirp: two ascending tones (2000→2800 Hz)
  - Heartbeat beep: two monotone 1500 Hz pulses
- Serial1 UART mirror skipped on VoiceS3R (USB-CDC only)
- setup(): M5.begin() + Speaker.setVolume(200) for VoiceS3R

New scripts
- flash_atom.sh: auto-detects /dev/tty.usbserial-*, venv auto-load
- flash_voices3r.sh: targets /dev/tty.usbmodem* (ESP32-S3 native USB-CDC),
  kills port-holding processes, uses brew esptool with --before usb-reset
- Both scripts activate venv automatically (searches .venv/venv/env/api/venv
  and ~/.platformio/penv in priority order)
- partitions_4mb.csv: custom partition table for all supported boards

Add -DTESTING_MODE=1 to any env's build_flags to alert on all WiFi frames.
…g mode docs

- Restored [env:xiao_esp32s3] (Seeed XIAO ESP32-S3, original upstream board)
- Added Supported Hardware table: xiao_esp32s3 / esp32dev / m5atom-echo /
  m5atom-lite / m5atom-voices3r with port types, audio/LED notes
- Replaced generic 'pio run' section with board-specific flash + monitor
  commands for all five environments
- Added VoiceS3R section: kill-port-holder one-liner + esptool fallback
  for ESP32-S3 native USB-CDC (fixes 'port busy' upload errors)
- Added Testing mode section: -DTESTING_MODE=1 build flag instructions
- Pin maps for XIAO ESP32-S3 (original) and Atom VoiceS3R
- Removed flash_atom.sh and flash_voices3r.sh (commands in README instead)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant