vibe code the initial impl
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
menu "Door Buzzer Detector"
|
||||
|
||||
menu "Hardware"
|
||||
config BUZZ_I2S_BCLK_GPIO
|
||||
int "I2S BCLK (mic SCK) GPIO"
|
||||
default 3
|
||||
range 0 48
|
||||
config BUZZ_I2S_WS_GPIO
|
||||
int "I2S WS (mic WS/LRCL) GPIO"
|
||||
default 4
|
||||
range 0 48
|
||||
config BUZZ_I2S_DATA_GPIO
|
||||
int "I2S data-in (mic SD) GPIO"
|
||||
default 5
|
||||
range 0 48
|
||||
choice BUZZ_I2S_SLOT
|
||||
prompt "I2S slot that carries the mic"
|
||||
default BUZZ_I2S_SLOT_LEFT
|
||||
help
|
||||
INMP441: L/R pin tied to GND -> left slot, tied to VDD -> right slot.
|
||||
config BUZZ_I2S_SLOT_LEFT
|
||||
bool "Left"
|
||||
config BUZZ_I2S_SLOT_RIGHT
|
||||
bool "Right"
|
||||
endchoice
|
||||
config BUZZ_AUDIO_SHIFT
|
||||
int "Right shift applied to the 32-bit I2S sample"
|
||||
default 14
|
||||
range 8 20
|
||||
help
|
||||
The INMP441 delivers 24-bit data left-justified in a 32-bit slot, so
|
||||
a shift of 16 keeps the top 16 bits (unity gain). A smaller shift adds
|
||||
digital gain (14 = 4x) which helps with this quiet mic; the result is
|
||||
clamped to int16. Fingerprints are level-independent, but the RMS gate
|
||||
is not.
|
||||
config BUZZ_BOOT_BUTTON_GPIO
|
||||
int "User button GPIO (BOOT)"
|
||||
default 0
|
||||
range 0 48
|
||||
config BUZZ_RGB_LED_ENABLE
|
||||
bool "Drive the on-board WS2812 status LED"
|
||||
default y
|
||||
config BUZZ_RGB_LED_GPIO
|
||||
int "RGB LED GPIO"
|
||||
default 48
|
||||
range 0 48
|
||||
depends on BUZZ_RGB_LED_ENABLE
|
||||
endmenu
|
||||
|
||||
menu "Detector defaults (runtime-adjustable, persisted in NVS)"
|
||||
config BUZZ_THRESHOLD_MILLI
|
||||
int "Cosine-similarity threshold x1000"
|
||||
default 800
|
||||
range 100 999
|
||||
config BUZZ_MIN_RMS
|
||||
int "Loudness gate: minimum frame RMS (int16 units)"
|
||||
default 200
|
||||
range 0 32767
|
||||
config BUZZ_WIN_N
|
||||
int "Sliding window length N (frames, 32 ms each)"
|
||||
default 15
|
||||
range 1 32
|
||||
config BUZZ_WIN_M
|
||||
int "Matches required M within the window"
|
||||
default 10
|
||||
range 1 32
|
||||
config BUZZ_COOLDOWN_MS
|
||||
int "Cooldown after an alert (milliseconds)"
|
||||
default 5
|
||||
range 0 86400000
|
||||
config BUZZ_NOISE_MULT_X10
|
||||
int "Learn/adapt gate: noise floor multiplier x10"
|
||||
default 40
|
||||
range 10 1000
|
||||
config BUZZ_ADAPT_WEIGHT_PCT
|
||||
int "Adapt: weight (percent) of the newly learned template"
|
||||
default 50
|
||||
range 0 100
|
||||
config BUZZ_MONITOR_MS
|
||||
int "Minimum interval between 'monitor' lines (ms)"
|
||||
default 100
|
||||
range 10 60000
|
||||
endmenu
|
||||
|
||||
menu "Wi-Fi"
|
||||
config BUZZ_WIFI_SSID
|
||||
string "Wi-Fi SSID"
|
||||
default ""
|
||||
config BUZZ_WIFI_PASSWORD
|
||||
string "Wi-Fi password"
|
||||
default ""
|
||||
endmenu
|
||||
|
||||
menu "ntfy notifications"
|
||||
config BUZZ_NTFY_SERVER
|
||||
string "ntfy server URL"
|
||||
default "https://ntfy.sh"
|
||||
config BUZZ_NTFY_TOPIC
|
||||
string "Alert topic (anyone who knows it can read it: make it unguessable)"
|
||||
default "change-me-door-buzzer"
|
||||
config BUZZ_NTFY_HB_TOPIC
|
||||
string "Heartbeat topic"
|
||||
default "change-me-door-buzzer-heartbeat"
|
||||
config BUZZ_HEARTBEAT_HOURS
|
||||
int "Heartbeat interval in hours (0 = disabled)"
|
||||
default 0
|
||||
range 0 720
|
||||
endmenu
|
||||
|
||||
endmenu
|
||||
Reference in New Issue
Block a user