Hello,
I have a project that is using the nRF24L01 radio modules, which uses SPI.
and have been using them successfully so far on arduino UNO and PRO mini boards.
The SPI library is the one that came with IDE 1.0.6
The RF24 library I have been using is by gcopeland, and tmrh20
Here are the relevant pages for reference.
http://maniacbug.github.io/RF24
http://tmrh20.github.io/RF24/index.html
Now, I am trying to get the same project to run on DUE, because UNO does not have
enough power to process the amount of data I need to send through it (several simultaneous IMU data streams).
I do not have need for the extended SPI as far as I know, I just need regular SPI, and I have not found any information regarding an SPI library that is specific to the DUE.
But so far, I keep getting a compile error as follows, which point to problems with SPI.h and SPI.cpp
To narrow down the problem, I have tried compiling the example ino that is in the SPI library folder.
I have searched around here and online for solutions, but to no avail.
Arduino Due with SPI declaration problem
http://forum.arduino.cc/index.php?topic=189865.0
Summary of mysteries about SPI and extended SPI library with Due
http://forum.arduino.cc/index.php?topic=167068.0
ILI9341 (new) SPI library for Arduino Due supporting DMA transfer
http://forum.arduino.cc/index.php?topic=265806.0
Has anyone had success compiling the SPI library on DUE?
Any help is appreciated and Happy holidays.
Compile error follows:
Arduino: 1.5.8 (Windows 8), Board: "Arduino Due (Native USB Port)"
In file included from BarometricPressureSensor.ino:26:0:
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h: In static member function 'static byte SPIClass::transfer(byte)':
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:56:3: error: 'SPDR' was not declared in this scope
SPDR = _data;
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:57:12: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF)))
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:57:23: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF)))
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:57:27: error: '_BV' was not declared in this scope
while (!(SPSR & _BV(SPIF)))
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h: In static member function 'static void SPIClass::attachInterrupt()':
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:63:3: error: 'SPCR' was not declared in this scope
SPCR |= _BV(SPIE);
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:63:15: error: 'SPIE' was not declared in this scope
SPCR |= _BV(SPIE);
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:63:19: error: '_BV' was not declared in this scope
SPCR |= _BV(SPIE);
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h: In static member function 'static void SPIClass::detachInterrupt()':
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:67:3: error: 'SPCR' was not declared in this scope
SPCR &= ~_BV(SPIE);
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:67:16: error: 'SPIE' was not declared in this scope
SPCR &= ~_BV(SPIE);
^
C:\Users\ME\Documents\Arduino\libraries\SPI/SPI.h:67:20: error: '_BV' was not declared in this scope
SPCR &= ~_BV(SPIE);
^
Error compiling.