0

I'm trying to incorporate audio into my Arduino project for the first time, and have been have a lot of issues. I originally couldn't get the Audio library to work, but after installing it through the Arduino application, I figured the Audio.h library would work fine. However, it spit out this error:

WARNING: library Audio claims to run on (sam) architecture(s) and may be incompatible with your current board which runs on (avr) architecture(s). In file included from /Documents/Arduino/libraries/Audio/src/Audio.h:16:0, from /Documents/Arduino/boxgame/boxgame.ino:1:

Then it lists plenty of syntax issues, none of which have to do with my code. I think it's giving errors from the library, but I'm not really sure what's happening. Here's an example of one of the slew of errors:

/Users/tschadius/Documents/Arduino/libraries/Audio/src/DAC.h:37:2: error: 'IRQn_Type' does not name a type IRQn_Type isrId;

Any ideas as to how I can fix this? The error message goes on for quite a while, but none of them appear to be from my code that I've written.

Thanks!

  • Need a bit more information to be able to answer this. Which particular board are you using? – SDsolar Oct 1 '17 at 19:43
  • Using a SparkFun redboard, which is essentially identical to the uno! – Tyler Oct 1 '17 at 19:51
  • The Uno cannot use that library. The Uno has no DAC. – Majenko Oct 1 '17 at 20:10
2

Occasionally people do not realize how many platforms the Arduino paradigm has been ported to. In almost all cases the ported to platform far exceeds the features found on an Arduino Uno. So there exists a considerable amount of software that can not run on an Arduino Uno or on an Arduino Uno with out additional hardware. But, usually, such software is surrounded by "text", "web-pages" and other "readme" type files explaining the situation.

For the Arduino Audio library, the web-page says this:

Audio

Compatible with Arduino Due only

The Audio library enables an Arduino Due board to play back .wav files from a storage device like an SD card.

The Due uses the DAC0 and DAC1 pins to play sounds.

| improve this answer | |
  • Thank you, I really appreciate your comment. I'll be sure to be more thorough about reading all associated documents next time. – Tyler Oct 1 '17 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.