Earlier, it was working with Arduino uno r3. Please suggest if any other compatible library for playing sound/audio file.
Welcome to the Forum! Read the forum guidelines to see how to properly ask a question and some good information on making a good post. You will get faster and better help if you show a link to the library and post your code as requested by the forum guidelines.
PCM library is used for playing Audio file. Please let me know if anyone tried to play audio file(.mp3) with Arduino UNO R4 WIFI board.
Please show the link to the library
On reason you should point to the library you are using is that there can be multiple versions and we would only be guessing which one.
If you are referring to this one: PCM - Arduino Reference it is not compatible with the UNO R4 boards. The R4 boards are ARM based while the R3 is AVR based. The PCM lib that I linked to is only compatible with the R3 AVR base version.
If you create a issue ( damellis/PCM: Arduino library for simple playback of audio samples using pulse-code modulation. (github.com)) the author may be able to update it - but it does not look like it has been updated in years and years.
Hi [Merlin513],
Thanks for the update
Yes..you are right PCM library is not supported/Compatible on R4 board. Please suggest the some other library to play audio in R4 board
Error=======
C:\Users\user\Documents\Arduino\libraries\PCM\PCM.c:30:10: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
^~~~~~~~~~
compilation terminated.
In some cases, with errors like this, where a library is using one of the header files, that are part of the AVR codebase. The problem can be resolved by trying to remove the usage of it.
And/Or add a dummy one to the new board type install.
But in this case, it would not help, as the library mainly works, by modifying AVR registers. And this board is not based on an AVR chip, so someone would need to either rewrite this library or create a complete enough AVR emulation, to satisfy this library.
Maybe @Merlin513 or others may have some suggestions. I do very little Audio. Mostly beeps using something like Tone. Or I might use the Audio library on a Teensy. But hopefully others will chime in on a good alternative.
Hi KurtE,
Thanks for the update.
You are right. For R4 board, we need to use different library for playing audio file(.mp3).
Can anyone in this forum suggest for alternate audio library for R4 board. Playing audio file should be a very common problem. As R4 is new board, users are facing challenge in this.
Are you sure?
Most arduinos can't play an audio files directly since not having a DAC and audio digital interfaces.
Sorry for taking so long to get back to you. Was browsing around and any audio project I looked at even, arm based, requires use of the built-in timers. Unfortunately none of those libs are going to be compatible with the existing timers you would have to modify the libraries for use with the R4. Sure someone will do it eventually
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.