; 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 = + ; --- BROADCASTER "Headset" -> Cardo (I2C 0x11) ------------------------------- [env:broadcaster_headset] build_src_filter = + build_flags = '-DTARGET_SPEAKER="Tangerine EDGE"' -DHUB_I2C_ADDR=0x11 ; --- BROADCASTER "Speaker 1" -> JBL (I2C 0x10) ------------------------------- [env:broadcaster_speaker1] build_src_filter = + 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 = + 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 = + 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