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
Circuit Playground Arduino wav file
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Lisa_M
- Posts: 10
- Joined: Mon Dec 17, 2018 2:56 pm
Re: Circuit Playground Arduino wav file
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.
- danhalbert
- Posts: 4655
- Joined: Tue Aug 08, 2017 12:37 pm
Re: Circuit Playground Arduino wav file
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/
You can use the ArduinoZero library, which plays audio on SAMD21-based boards: https://www.arduino.cc/reference/en/lib ... audiozero/
- Lisa_M
- Posts: 10
- Joined: Mon Dec 17, 2018 2:56 pm
Re: Circuit Playground Arduino wav file
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.
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.
- danhalbert
- Posts: 4655
- Joined: Tue Aug 08, 2017 12:37 pm
Re: Circuit Playground Arduino wav file
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.
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.
- Lisa_M
- Posts: 10
- Joined: Mon Dec 17, 2018 2:56 pm
Re: Circuit Playground Arduino wav file
Thank you, I'll check that out. Much appreciated.
Please be positive and constructive with your questions and comments.