Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.
0

Circuit Playground Arduino wav file
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Circuit Playground Arduino wav file

by Lisa_M on Mon Dec 06, 2021 4:05 pm

Hi folks,

I'm trying to find a guide for how to play a .wav file while coding Circuit Playground with arduino. I'm not having any luck. Everything keeps pointing me to Circuit Python - which i'm currently not using with my students.

Anyone have a helpful link?

Thanks

Lisa_M
 
Posts: 10
Joined: Mon Dec 17, 2018 2:56 pm

Re: Circuit Playground Arduino wav file

by Lisa_M on Mon Dec 06, 2021 4:48 pm

I should add that we picked up some STEMMA speakers too. There are makecode and circuit python projects ...but nothing in arduino that I can find.

Lisa_M
 
Posts: 10
Joined: Mon Dec 17, 2018 2:56 pm

Re: Circuit Playground Arduino wav file

by danhalbert on Tue Dec 07, 2021 11:58 am

I'm assuming these are Circuit Playground Express boards, not Circuit Playground Classic (it says on the back). Is that right?

You can use the ArduinoZero library, which plays audio on SAMD21-based boards: https://www.arduino.cc/reference/en/lib ... audiozero/

danhalbert
 
Posts: 3162
Joined: Tue Aug 08, 2017 12:37 pm

Re: Circuit Playground Arduino wav file

by Lisa_M on Tue Dec 07, 2021 3:39 pm

We are using a mix of Circuit Playground and Circuit Playground Express because I do not have a full class set of Express.

It's nice to know there is an audio library for the SAMD board.

I'm pretty new to Arduino though so I'm also hoping for some sample code or a tutorial so I can see the code in action.

Thank you.

Lisa_M
 
Posts: 10
Joined: Mon Dec 17, 2018 2:56 pm

Re: Circuit Playground Arduino wav file

by danhalbert on Tue Dec 07, 2021 4:21 pm

There is a simple example here, which I think would also show up in the examples in the Arduino IDE: https://github.com/arduino-libraries/Au ... erZero.ino

In general, for a plain Arduino board, there is not enough flash to hold a .wav file of any size. There are Arduino shields for SD cards so you can play .wav files. Otherwise most Arduino audio is playing tones.

danhalbert
 
Posts: 3162
Joined: Tue Aug 08, 2017 12:37 pm

Re: Circuit Playground Arduino wav file

by Lisa_M on Tue Dec 07, 2021 5:45 pm

Thank you, I'll check that out. Much appreciated.

Lisa_M
 
Posts: 10
Joined: Mon Dec 17, 2018 2:56 pm

Please be positive and constructive with your questions and comments.