joba-1 / PicoW_A2DP

Bluetooth A2DP Sink to I2S/DAC on a Raspberry Pico W
5 stars 2 forks source link

Raspberry Pico W A2DP Sink to I2S/DAC

Use a Raspberry Pico W to receive music from a smartphone or other bluetooth A2DB source and send it via I2S to a DAC like the PCM5102.

Based on the BTStack a2db-sink demo of the pico-examples repo. Not being embedded in the build structure of all examples makes it much easier to see what is actually required, to modularize and enhance. Still uses pico-extras for i2s audio.

Feel free to ask if you need help to get this running. Comments or improvements welcome :)

Programming

Configuration

Debugging / Flashing

Use commandline to cmake the firmware, then copy the UF2 to the USB filesystem or use picoprobe and openocd to flash the firmware and openocd/gdb to debug. Alternatively use VS Code with CMake Tools and Cortex Debug extensions as a build/debug environment. To help VS Code find your openocd binary, add it in ~/.config/Code/User/settings.json before the closing "}" similar to this:

    "cortex-debug.openocdPath": "/home/joachim/pico/openocd/src/openocd"

To flash/debug with VS Code, select "Run and Debug" or Ctrl+Shift+D, at the top select "Pico Debug (your project)". Now the green arrow or F5 flashes the new firmware and starts a debug session.

WIP

Currently done:

Status is: already works pretty well. Will probably wait for the btstack to stabilize in the pico-sdk before I try to find my own bugs...

Added Features