Skip to content

A2DP to PWM help needed #6

@hchahine

Description

@hchahine

Hi,

I've got a ESP32 project where I read audio from a source (right now it's a simple WAV file located in flash) and then send it to a PWM ouput via the ESP32's ledc module.

So its 8bit unisigned WAV data TO 150kHz PWM who's duty cycle is updated at the sample rate of the audio file (40kHz).

This is to play clear audio on a tesla coil. I got it working pretty well right now via my own simple code. I now want to upgrade this so I can stream audio from bluetooth as the audio source via A2DP using your libraries.

I believe the audio-tools stream functions should do the job but I can't quite figure out how to connect the A2DP input stream to my own output PWM module. Or better yet, do it all from your libraries.

I'm aware there's a AudioPWM example but I can't get this work for ESP32 because I believe it's only support the Rpi Pico at the moment. The other output streams are only things like I2S and CSV/Serial.

How to do I get access to the A2DP data to then send to the PWM module OR better yet how do I simply stream the data as it comes in using your libraries? Something akin to a simple memcopy - even via a callback would do.

Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions