How s0lidstat3/dendrite works
Project type and purpose
• This is a hardware-centric embedded system with two cooperating firmware modules (on ESP32-C3 and ESP32-S3) plus PC-side Python tooling.
File structure
• Top-level:
• docs/ – calibration, wiring, protocol, quickstart, troubleshooting
• firmware/ – two ESP32 platforms
• prototyping_tools/ – Python scripts for calibration and visualization
• firmware/esp32-c3-scanner:
• debug_serial/ – prototype mode, outputs direction data via serial
• production_i2c_slave/ – production mode, acts as I2C slave sending direction
• firmware/esp32-s3-wled-usermod:
• WLED core + custom usermod to overlay direction on existing animations
• PlatformIO config files, usermod source under WLED/usermods
• prototyping_tools:
• calibration/ – interactive BLE angle calibration (calibration.py)
• radar_visualizer/ – serial data visualizer (Prototype_Python_Serial_Visualizer.py)
Readme insights
• System overview: BLE scanner feeds direction data; WLED usermod changes presets and lights LEDs.
• External dependencies: WLED firmware on ESP32-S3, Arduino/PlatformIO builds, Python 3 for tools.
• Communication protocol documented in docs/protocol_spec.md
Main components
a. Hardware
• BLE Antenna array (hardhat)
• ESP32-C3 (BLE scanner MCU)
• ESP32-S3 (WLED MCU plus LED driver)
• LED strip (e.g., WS2812)
• Power supply / battery / level shifter (if any)
b. Firmware modules
• esp32-c3-scanner (two build variants):
– Debug mode: UART TX of direction data
– Production mode: I2C slave providing direction registers
• esp32-s3-wled-usermod:
– WLED core engine
– Custom usermod for BLE direction overlay
– Preset loader (idle/detected JSON)
c. PC-side tools (optional external components)
• Calibration script (calibration.py) – USB-serial to ESP32-C3 for calibration angles
Relationships and data flow
• BLE antenna array → analog front-end (antenna switching) → ESP32-C3
• ESP32-C3 scans BLE RSSI, computes angle
• In debug mode: angle → UART → PC visualizer
• In production: angle → I2C → ESP32-S3 usermod
• ESP32-S3 usermod receives angle, selects preset, overlays white LEDs on LED strip
• LED strip displays combined WLED animation + direction indicator
• PC tools (calibration) ↔ USB-serial ↔ ESP32-C3 for tuning antenna angle offsets
Architectural patterns and design principles
• Separation of concerns:
• Scanning and angle computation on a dedicated MCU (ESP32-C3)
• Visualization and LED control on another MCU (ESP32-S3) running a mature LED firmware (WLED)
• Extensibility via WLED usermod API
• Modularity: two firmware builds for pre-production vs production; clear protocol (docs/protocol_spec.md)
• Reusable PC tools separated from embedded code
Technologies, frameworks, libraries
• Arduino/PlatformIO for ESP32 builds
• WLED open-source LED controller
• Custom C++ usermods in WLED
• Python 3 for calibration & visualization tools
• I2C and UART hardware interfaces
Diagramming recommendations
• Labels:
• Clouds for external docs/protocol spec