Adafruit Audio BFF Add-on for QT Py and Xiao (ADA5769)

This is a placeholder topic for “Adafruit Audio BFF Add-on for QT Py and Xiao” comments.

Our QT Py boards are a great way to make very small microcontroller projects that pack a ton of power - and now we have a way for you to turn many QT Py…

Read more

I’m working on this with the xiao esp32s3 and arduino ide
I’m getting back a invalid word select pin error.
I assume its just because I’m naming the i2s pins badly.
I’ve tried ‘A2’ and 4 and D4 etc.

const i2s_pin_config_t pin_cfg = {
  .bck_io_num = 4 ,
  .ws_io_num = 3,
  .data_out_num = 2,
  .data_in_num = I2S_PIN_NO_CHANGE
};

How do I spell the i2s pins so i can talk to the bff?

Hi @Pixmusix ,

For the ESP32S3, you should be able to name a pin in the Arduino IDE by using the D* name of the pin as per the diagram below. Using the GPIO* will also work (GPIO1/D0 will be ‘1’, GPIO7/D8 will be ‘7’), but this method is less consistent across boards, and as you can see, some pins like GPIO43/D6 have pretty unintuitive number match-ups.

so TOUCH4 / GPIO4 / A3 / D3 can be targeted by using either: .bck_io_num = 4, or .bck_io_num = D3,

I think you should be fine with how the two boards fit together, but it’s worthwhile keeping in mind that GPIO3/D2 is documented as a strapping pin, which will mean it won’t play nice if you try to use I2C through this pin.

Good luck with this one!

1 Like

did you mean i2s?

Whoops! Typed that a bit fast. Yes I did mean to say I2S. :slight_smile:

1 Like

Huh… so If I want to use i2s with the xiao + audio bff, its never going to work because the ws pin I need is strapped. That’s a dealbreaker right? Doesn’t that mean this thing is only really compatible with the qtpy?

Hi everyone.

Solution

Yes, it can work on the xiao S3 you just need

  1. to add a nice big delay to wait for the strapping to settle.
  2. add a pull-up resistor to D2 to bring it out of floating.

The header files and cpp files for the i2s driver use templates. c++ templates do some of their work at compile time, meaning that its not possible to delay when they attempt, and fail, to configure the pins. We just need to be generous and finish off what the cpp file started.

Important :warning:

I’m using earlephilhower’s lib which I believe uses old drivers. I need earlephilhower’s code because it exposes a lot more of its memory management on the heap and I want that fine control to keep my wifi and audio talking on core0. Research online leaves me to believe that the modern esp32 i2s_std driver will not have my issue.

Its too late for me, but I can save you. Be wise and love yourself; choose the modern i2s driver!

2 Likes

Sometimes it’s great to be proven wrong.

Glad to see you got this working, Pix. I thought for sure the SD Card reader would have prevented access to the pins, but I’m glad to hear I’m wrong and that you got it working.

2 Likes