Audioio

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mahaar
 
Posts: 9
Joined: Mon Feb 22, 2021 2:04 pm

Audioio

Post by mahaar »

Hello,

I am working on an arduino project (my first) to replace an audio element in a snow globe that used to play a song! The slot that it needs to fit inside is tiny (circular and 27.5mm in diameter). The GEMMA v2 would fit and the QT Py might fit (can't find its dimensions), but on the CircuitPython Audio Out page, it says, "QT Py M0, Trinket M0 and Gemma M0 do not support audioio!" Does this warning also apply to the newer GEMMA v2 or only the older GEMMA M0, and is this https://www.adafruit.com/product/4600 QT PY the QT PY M0 (meaning it also doesn't have audio out capabilities)? With respect to the GEMMA v2, I suspect that it does have audio capabilities, because I found this: https://www.adafruit.com/product/1759

Additionally, if I got that kit and used it for my purposes, three more questions:
1. How long could the audio file be in seconds?
2. Could I substitute a coin 3v cell battery so that it would fit?
3. What elements in that kit would I not need? I don't need any of the motion sensing stuff; I just want to press a button and have the song play.

Thanks so much for your help!!!

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Audioio

Post by adafruit_support_carter »

That warning only applies to CircuitPython. Since you are going to use Arduino, it does not apply. Further, the Gemma V2 can not even run CircuitPython, which is why it's not even mentioned in the warning.

That kit may be a good way to get started. The motion control is done with a very simple tilt sensor:
https://www.adafruit.com/product/173
which essentially acts like a button. So the kit, as is, could provide an easy start, or at least a good reference design.

User avatar
mahaar
 
Posts: 9
Joined: Mon Feb 22, 2021 2:04 pm

Re: Audioio

Post by mahaar »

1. How long can the audio file be (in seconds) using that kit? I ask because an owl's chirp is significantly shorter than a song.
2. Could I replace the battery in the kit with a 3v button cell battery? The battery included in the kit would not fit inside the slot.

User avatar
mahaar
 
Posts: 9
Joined: Mon Feb 22, 2021 2:04 pm

Re: Audioio

Post by mahaar »

Following up!

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Audioio

Post by adafruit_support_carter »

The owl example uses tone generation, so sound length can be as long as you want. But if you want something like wav file playback, then it's a matter of how much can fit in GEMMA memory.
I am working on an arduino project (my first)
Any special reason you are using Arduino instead of CircuitPython?

User avatar
mahaar
 
Posts: 9
Joined: Mon Feb 22, 2021 2:04 pm

Re: Audioio

Post by mahaar »

I can’t find any board that runs circuit python that would fit inside of the circular 27.5mm diameter hole inside the snow globe.

What kind of file would I give to Gemma for sound generation?

And if wave, do you know how much can fit in GEMMA memory?

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Audioio

Post by adafruit_support_carter »

Look at Arduino examples that store wave files in memory and use that for output. That will give you some idea of what's involved.

User avatar
mahaar
 
Posts: 9
Joined: Mon Feb 22, 2021 2:04 pm

Re: Audioio

Post by mahaar »

I have; most of them use much larger boards than Gemma. That’s why I ask, is there any chance you know how much storage is on Gemma?

User avatar
mahaar
 
Posts: 9
Joined: Mon Feb 22, 2021 2:04 pm

Re: Audioio

Post by mahaar »

Also, could I replace the battery in the kit with a 3v button cell battery? The battery included in the kit would not fit inside the slot.

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Audioio

Post by adafruit_support_carter »

See here for info on suggested battery input options:
https://learn.adafruit.com/adafruit-gem ... -2912360-2
You can plug anything from around 4 VDC up to 6 VDC.
A single cell would only be ~3V, so not enough. The guide links to this as the suggested coin cell option:
https://www.adafruit.com/product/783

User avatar
mahaar
 
Posts: 9
Joined: Mon Feb 22, 2021 2:04 pm

Re: Audioio

Post by mahaar »

Thanks! Most of the other arduino music players use much larger boards than Gemma. That’s why I ask about the length of the song I could fit, is there any chance you know how much storage is on Gemma?

User avatar
mahaar
 
Posts: 9
Joined: Mon Feb 22, 2021 2:04 pm

Re: Audioio

Post by mahaar »

I am still waiting for a reply, please respond!

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Audioio

Post by adafruit_support_carter »

The GEMMA V2 has 8kB of flash and 512B of RAM.

The GEMMA M0 has 256kB of flash and 32kB of RAM.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”