Arduino DUE with Wave shield

Hi there,

I'm very new to the arduino world and I hit a wall trying to run the first example sketch for the wave shield on my arduino Due.

Here are the errors I get. I search during two days to find a solution, I can find similar error reports but nothing quite identical.

C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:147: error: #if with no expression
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp: In function 'void spiSend(uint8_t)':
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:33: error: 'SPDR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:34: error: 'SPSR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:34: error: 'SPIF' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp: In function 'uint8_t spiRec()':
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:40: error: 'SPDR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp: In member function 'uint8_t SdReader::init(uint8_t)':
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:152: error: 'SPCR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:152: error: 'SPE' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:152: error: 'MSTR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:152: error: 'SPR1' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:213: error: 'SPR0' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:215: error: 'SPSR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:215: error: 'SPI2X' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp: In member function 'uint8_t SdReader::readData(uint32_t, uint16_t, uint8_t*, uint16_t)':
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:253: error: 'SPDR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:257: error: 'SPSR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:257: error: 'SPIF' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:264: error: 'SPSR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:264: error: 'SPIF' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:270: error: 'SPSR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:270: error: 'SPIF' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp: In member function 'void SdReader::readEnd()':
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:281: error: 'SPDR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:283: error: 'SPSR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:283: error: 'SPIF' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:287: error: 'SPSR' was not declared in this scope
C:\Users\CHEMIN\Documents\Arduino\arduino-1.5.2-windows\arduino-1.5.2\libraries\WaveHC\SdReader.cpp:287: error: 'SPIF' was not declared in this scope

My understanding of the problem is that SPDR and the other values are some kind of macro for arduino but I don't understand where they should be declared. The arduino example sketches compile correctly so I assume the problem is not coming from the IDE. I found the SPI c++ class by roaming around the arduino IDE files and I think it's pretty much doing the same thing as the SPI bit in the sdreader.cpp but I don't know if it's possible to modify sdreader.cpp to use SPI.h.

Anyway any help would be much appreciated as I am at a complete loss. Thanks for your time

Which wave shield? Is it 3.3V compatible?

The wave shield is the Adafruit Wave Shield for Arduino Kit - v1.1. I couldn't find anywhere on it's description if it had a specific voltage.

At that point though the errors come from the verification of the code, not the hardware itself. Which is what puzzles me. I'm pretty sure I'm just missing a library or something but I can't figure out what I'm missing.

Thank you for answering.

Download the latest library here (currently: Feb 18, 2008 which now supports the 328P and arduino v13 under mac and windows & probably linux)

The library has not been updated for the Due.

http://www.ladyada.net/images/wavshield/v11/wave11schem.png ... The shield is designed to operate at 5V. My suspicion is that everything will work except the SD card voltage regulator (the SD card will not be correctly powered).

I believe the Due pin assignment is a bit different from the other Arduino boards. It is possible the SPI pins are no longer in the correct place for that shield.

You need to contact the folks at Ada Fruit for guidance.