I recently bought an Arduino Due for a project that needs copious amounts of RAM and flash memory and when I went to compile the sketch for it and the IDE instantly returned an error saying:
fatal error: avr/io.h: No such file or directory
compilation terminated.
It also does this for avr/pgmspace.h too, and when I upload the trimmed-down version of the code onto my UNO, I get no error. I'm using version 1.5.2 of the IDE.
I've only had my UNO for a few weeks, and my Due for a day, so I'm pretty new to all this, and if the problem is super-obvious, you'll know why I couldn't figure it out.
Thanks for reading and thanks even more if you can help!
I think that library will not work with the Arduino Due. http://playground.arduino.cc/Code/PCMAudio
If you want to use the PCMaudio, use an Arduino Uno.
The code is made compatible with the Arduino Mega, but the Arduino Due is something else.
The PCMAudio library uses code like this: "TCCR2A |= _BV(WGM21) | _BV(WGM20);". That is directly writing the registers of the avr chips ("avr" are the microcontroller family made by Atmel used in most Arduino boards). But the Arduino Due uses a ARM microcontroller with other registers.
Clym5:
I recently bought an Arduino Due for a project that needs copious amounts of RAM and flash memory and when I went to compile the sketch for it and the IDE instantly returned an error saying: