3 Commits

Author SHA1 Message Date
e79ae74155 Sink-only proof-of-life (diagnostic)
Replace src/main.cpp with a minimal single-object A2DP sink advertising
"BikeAudio", to verify the iPhone can discover + connect. Isolates the
sink/advertising path that the full sketch corrupts by instantiating one
sink + two sources (ESP32-A2DP uses a global singleton that each
constructor overwrites; a single Bluedroid A2DP callback is registered, so
the sink is orphaned and never discoverable). Not the final firmware —
does not drive the speakers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 10:18:00 -04:00
04e7f20430 Convert Arduino sketch to PlatformIO project
Restructure BikeAudio for PlatformIO while preserving the original
build specs from the .ino header:
  - platform espressif32 @ ~6.6.0  -> ESP32 Arduino core 2.0.17
  - board esp32dev (ESP32 DevKitC v4)
  - board_build.partitions = huge_app.csv (Huge APP, required for BT stack)
  - monitor_speed = 115200

Changes:
  - BikeAudio.ino -> src/main.cpp (+ #include <Arduino.h>, print_status()
    forward declaration; PlatformIO compiles .cpp directly and does not
    auto-generate prototypes like the Arduino IDE).
  - Add platformio.ini with pschatzmann ESP32-A2DP + arduino-audio-tools
    pinned to exact commits (ESP32-A2DP 1.8.11, audio-tools 1.2.4) for
    reproducible builds.
  - Adapt three spots to the current library API (behavior preserved):
      * RingBuffer<uint8_t>::read() -> bool read(T&)
      * connection-state callbacks: drop esp_bd_addr_t arg
        -> (esp_a2d_connection_state_t, void*)
      * BluetoothA2DPSource::start(name, bool) -> start(name)
        (auto-reconnect already configured via set_auto_reconnect(true))

Verified: pio run -e esp32dev succeeds.
RAM 14.5% (47.6 KB), Flash 42.0% (1.32 MB / 3 MB).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 09:44:09 -04:00
Sebastien Vayrette
276489cb17 feat: initial BikeAudio firmware
ESP32 DevKitC v4 Bluetooth audio relay.
iPhone -> ESP32 (A2DP sink) -> JBL Charge 5 + Tangerine EDGE (dual A2DP source).
Dual mirrored ring buffers for in-sync output, auto-reconnect on boot.
2026-06-09 12:51:08 -04:00