Product name BikeAudio -> "Resound" (the device isn't bike-specific — works at
home, backyard, camping, parties, group rides). This is the A2DP advertise name
the phone connects to: sink.start("Resound"). All banners/comments + README
updated. (After reflashing the sink, the phone must forget "BikeAudio" and
connect to "Resound".)
Firmware vocabulary clarified (the old hub/sink/source was confusing —
"source" read backwards since those boards SEND audio):
hub_s3.cpp / env hub_s3 -> hud.cpp / env hud
board_sink.cpp -> sink.cpp (env sink)
board_source.cpp -> broadcaster.cpp (envs broadcaster_headset
0x11, broadcaster_speaker1 0x10,
broadcaster_guest 0x12)
hub_proto.h -> bus_proto.h
default_envs = sink + the three broadcasters. All envs build clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
76 lines
3.0 KiB
INI
76 lines
3.0 KiB
INI
; BikeAudio — split-board Bluetooth audio relay.
|
|
;
|
|
; Roles (one ESP32 can't be A2DP sink+source, and a source reaches one speaker,
|
|
; so the work is split across boards sharing an I2S audio bus + an I2C control bus):
|
|
; SINK - iPhone connects here (A2DP in) -> drives the I2S bus as master
|
|
; BROADCASTER - reads I2S -> A2DP-streams to ONE speaker (one per channel)
|
|
; HUD - ESP32-S3 round touch LCD; control panel over I2C
|
|
;
|
|
; Channels are brand-agnostic: Headset / Speaker 1 / Guest (discovery picks the
|
|
; real device per channel). Build one: pio run -e sink | -e broadcaster_headset
|
|
; | -e broadcaster_speaker1 | -e broadcaster_guest | -e hud
|
|
;
|
|
; Audio boards: ESP32 core 2.0.x via espressif32 ~6.6.0, esp32dev, huge_app (BT stack).
|
|
|
|
[platformio]
|
|
default_envs = sink, broadcaster_headset, broadcaster_speaker1, broadcaster_guest
|
|
|
|
[env]
|
|
platform = espressif32 @ ~6.6.0
|
|
board = esp32dev
|
|
framework = arduino
|
|
board_build.partitions = huge_app.csv
|
|
monitor_speed = 115200
|
|
; pschatzmann libs pinned to exact commits (ESP32-A2DP 1.8.11, audio-tools 1.2.4)
|
|
lib_deps =
|
|
https://github.com/pschatzmann/ESP32-A2DP#42601717cd70d5300c9b519f3c2bf1d64d77ea2b
|
|
https://github.com/pschatzmann/arduino-audio-tools#64b64dcb9bde18a0a17766eeb6529c3a53d920a8
|
|
|
|
; --- SINK: A2DP sink (iPhone) -> I2S master ----------------------------------
|
|
[env:sink]
|
|
build_src_filter = +<sink.cpp>
|
|
|
|
; --- BROADCASTER "Headset" -> Cardo (I2C 0x11) -------------------------------
|
|
[env:broadcaster_headset]
|
|
build_src_filter = +<broadcaster.cpp>
|
|
build_flags = '-DTARGET_SPEAKER="Tangerine EDGE"' -DHUB_I2C_ADDR=0x11
|
|
|
|
; --- BROADCASTER "Speaker 1" -> JBL (I2C 0x10) -------------------------------
|
|
[env:broadcaster_speaker1]
|
|
build_src_filter = +<broadcaster.cpp>
|
|
build_flags = '-DTARGET_SPEAKER="JBL Charge 5"' -DHUB_I2C_ADDR=0x10
|
|
|
|
; --- BROADCASTER "Guest" -> antenna board, occasional passenger (I2C 0x12) ---
|
|
; No hardcoded device — pick the speaker via the HUD scan UI (discovery).
|
|
[env:broadcaster_guest]
|
|
build_src_filter = +<broadcaster.cpp>
|
|
build_flags = '-DTARGET_SPEAKER="Guest"' -DHUB_I2C_ADDR=0x12
|
|
|
|
; --- HUD: ESP32-S3-Touch-LCD-1.28 (round GC9A01 LCD + CST816S touch) ----------
|
|
; Different chip (esp32s3); LVGL UI + I2C master to the audio boards.
|
|
; NOT in default_envs — build with: pio run -e hud
|
|
[env:hud]
|
|
platform = espressif32 @ ~6.6.0
|
|
board = esp32-s3-devkitc-1
|
|
framework = arduino
|
|
board_upload.flash_size = 4MB
|
|
board_build.partitions = default.csv
|
|
monitor_speed = 115200
|
|
build_src_filter = +<hud.cpp>
|
|
lib_deps =
|
|
lovyan03/LovyanGFX@^1.1.16
|
|
lvgl/lvgl@^8.3.11
|
|
; LVGL via build flags (LV_CONF_SKIP -> defaults + overrides); no lv_conf.h.
|
|
; Keep flag values free of shell-special chars (parens/spaces). Tick via
|
|
; lv_tick_inc() in loop() (no LV_TICK_CUSTOM, which needs a parenthesised expr).
|
|
build_flags =
|
|
-DLV_CONF_SKIP=1
|
|
-DLV_COLOR_DEPTH=16
|
|
-DLV_COLOR_16_SWAP=1
|
|
-DLV_MEM_SIZE=49152
|
|
-DLV_FONT_MONTSERRAT_14=1
|
|
-DLV_FONT_MONTSERRAT_20=1
|
|
-DLV_FONT_MONTSERRAT_28=1
|
|
-DLV_FONT_MONTSERRAT_48=1
|
|
-DLV_USE_LOG=0
|