Files
led-controller/v2/main/Kconfig.projbuild
T
jimmyandClaude Sonnet 5.5 a94d6a7de5 feat(v2): ESP32-S3 controller with Ethernet, I2S mic beat detection and ESP-NOW
New ESP-IDF project in v2/ that replaces the Pi and the UART bridge:

- W5500 Ethernet, INMP441 beat/tempo detector (from esp32-eth), ESP-NOW master
- LittleFS data store and a JSON API over the Pi's db/*.json collections,
  with /db import and export; web UI minified and gzipped at build time
- Zone play/stop as 0x4C GROUP_CMD, preset push/send as CMD (binary v2
  envelope, byte-identical to src/util/binary_envelope.py), sequencer and
  scenes, driver registration from the boot hello
- Reliable bulk link: acks with retransmit, fragments, state-version digest
  and resync; beat frames sent twice with a lead so drivers fire together
- Bench tooling: lossy-link mode, synthetic beats with echo measurement,
  USB and logic-analyzer latency scripts, and docs/BENCH_TEST.md

Needs the matching led-driver changes (p2p branch) to receive the link and
beat frames.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 17:15:28 +13:00

140 lines
3.4 KiB
Plaintext

menu "W5500 config"
config W5500_SPI_HOST
int "SPI host number (1=SPI2, 2=SPI3)"
range 1 2
default 1
config W5500_SPI_CLOCK_MHZ
int "SPI clock speed (MHz)"
range 5 80
default 20
config W5500_SCLK_GPIO
int "SCLK GPIO (XIAO D8)"
default 7
config W5500_MISO_GPIO
int "MISO GPIO (XIAO D9)"
default 8
config W5500_MOSI_GPIO
int "MOSI GPIO (XIAO D10)"
default 9
config W5500_CS_GPIO
int "CS GPIO (XIAO D1)"
default 2
config W5500_INT_GPIO
int "INT GPIO (XIAO D2), -1 to poll"
default 3
config W5500_POLL_PERIOD_MS
int "RX poll period (ms) when INT is -1"
default 10
config W5500_RST_GPIO
int "RST GPIO (XIAO D0), -1 if not wired"
default 1
endmenu
menu "INMP441 mic config"
config MIC_SCK_GPIO
int "SCK GPIO (XIAO D4)"
default 5
config MIC_WS_GPIO
int "WS GPIO (XIAO D5)"
default 6
config MIC_SD_GPIO
int "SD GPIO (XIAO D6)"
default 43
config MIC_STREAM_GAIN
int "Digital gain for the audio stream (x)"
range 1 256
default 16
help
The INMP441 is quiet at full scale; x16 (+24 dB) makes speech
audible without clipping at normal distances.
endmenu
menu "Beat detection config"
config BEAT_LED_GPIO
int "Beat LED GPIO (XIAO user LED is 21), -1 for none"
default 21
config BEAT_LED_ACTIVE_LOW
bool "Beat LED lights when the pin is low"
default y
config BEAT_LED_PULSE_MS
int "Beat LED flash length (ms)"
range 10 500
default 60
config BEAT_LED_DOWNBEAT_MS
int "Beat LED flash length on the first beat of a bar (ms)"
range 10 1000
default 200
config BEAT_GATE_DBFS
int "Ignore audio quieter than this (dBFS, before stream gain)"
range -100 -20
default -75
help
The INMP441 self-noise is about -87 dBFS. Background music in a
room can sit around -65 dBFS, so keep this well below that.
config BEAT_LEAD_MS
int "Fire predicted beats this early (ms)"
range 0 200
default 30
help
Beats are predicted from the tempo, so they can be sent early
to cancel the ~30 ms of capture and analysis latency. Raise it
to cover output latency too (e.g. network or lights).
endmenu
menu "ESP-NOW config"
config ESPNOW_CHANNEL
int "Wi-Fi channel shared with the LED drivers"
range 1 13
default 6
config BEAT_TX_COPIES
int "Copies sent of every beat frame"
range 1 4
default 2
help
Each beat is broadcast this many times with the same beat index.
Drivers act on the first copy that arrives and drop the rest.
config BEAT_TX_GAP_US
int "Gap between beat copies (us)"
range 500 10000
default 2000
config BEAT_TEST_GPIO
int "GPIO toggled on every beat sent (-1 = off)"
range -1 48
default -1
help
For latency measurement: a logic analyzer or scope on this pin and on
the driver's beat pin shows the true master-to-LED delay.
config BULK_HOLDOFF_US
int "Hold bulk traffic back after a beat (us)"
range 0 20000
default 3000
endmenu