wav sounds with Arduino nano
Moderator: Benj
wav sounds with Arduino nano
I tried many example with wav files, unfortunately I can't get the sound out,,,, please, I need example of any sound like mp3 or wav for Arduino nano or ATmega386. using normal SD card module with 4G card memory formatted in FAT. thanks a lot
-
- Valued Contributor
- Posts: 1191
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 440 times
- Contact:
Re: wav sounds with Arduino nano
A board like the dfplayer is probably the easeist route?
Try https://uk.banggood.com/search/dfplayer.html?from=nav
It works very well - support is good and sound quality reasonable.
Martin
Try https://uk.banggood.com/search/dfplayer.html?from=nav
It works very well - support is good and sound quality reasonable.
Martin
Re: wav sounds with Arduino nano
Thanks, Martin
but i wana use normal sd card module, i found many applications in Arduino IDE. but I can't use it in flowcode. totally I need it
like this https://www.aliexpress.com/item/3287733 ... dPlD3KGwFL
but i wana use normal sd card module, i found many applications in Arduino IDE. but I can't use it in flowcode. totally I need it
like this https://www.aliexpress.com/item/3287733 ... dPlD3KGwFL
-
- Valued Contributor
- Posts: 1191
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 440 times
- Contact:
Re: wav sounds with Arduino nano
I did post a snippet of code here https://www.flowcode.co.uk/forums/viewt ... 6284#p6284 - although this read sound from an EEPROM chip - you might be able to get it to work from SD (speed is going to be an issue)
The Arduino doesn't have any sound generation hardware - so although it's possible (just) - it's not going to be an easy job. Adafruit used to do a shield that could do this https://www.adafruit.com/product/94 - it was quite expensive, and may no longer be available. It was also not as good as a dfplayer.
Do you have a link to an Arduino program that can do what you want?
Martin
The Arduino doesn't have any sound generation hardware - so although it's possible (just) - it's not going to be an easy job. Adafruit used to do a shield that could do this https://www.adafruit.com/product/94 - it was quite expensive, and may no longer be available. It was also not as good as a dfplayer.
Do you have a link to an Arduino program that can do what you want?
Martin
Re: wav sounds with Arduino nano
An easy code, with a few lines > playing reasonable wav sound ... like here https://www.instructables.com/Playing-W ... g-arduino/
actually, I did it, but the flowcode is my life
actually, I did it, but the flowcode is my life
-
- Valued Contributor
- Posts: 1191
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 440 times
- Contact:
Re: wav sounds with Arduino nano
Easy - but the tmrpcm library is doing a lot of the work..
It is how I did it as well, except no library - did you look at the above link - I used pin 11 for the output - this would need to be changed to pin 9 to allow the ad card to be read using hardware spi.
Try modifying my code and I'll try and help if you get stuck...
You also asked about mp3s - I don't think that is going to happen though!
Martin
It is how I did it as well, except no library - did you look at the above link - I used pin 11 for the output - this would need to be changed to pin 9 to allow the ad card to be read using hardware spi.
Try modifying my code and I'll try and help if you get stuck...
You also asked about mp3s - I don't think that is going to happen though!
Martin
Re: wav sounds with Arduino nano
I modified the formal example to be that in my drive>>> https://drive.google.com/file/d/1N58yfX ... share_link
it seems work fine in simulation after add the same wav file with specific conditions
it seems work fine in simulation after add the same wav file with specific conditions
-
- Valued Contributor
- Posts: 1191
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 440 times
- Contact:
Re: wav sounds with Arduino nano
Thanks,
It looks good - a very neat solution - does it work on hardware or does the SD card speed limit it. I wasn't aware of the WavPlayerFAT component - but it looks a useful addition, and does the double buffering too.
Martin
It looks good - a very neat solution - does it work on hardware or does the SD card speed limit it. I wasn't aware of the WavPlayerFAT component - but it looks a useful addition, and does the double buffering too.
Martin