can't compile the struct send / receive examples

Started by DRCO, September 21, 2016, 02:17:46 AM

DRCO

Hi Forum,
First up, I am unable to compile the struct send / receive examples using the Arduino IDE. Is anyone else having this problem? I continually get the error:
exit status 1
'class SPIFlash' has no member named 'initialize'
the ide highlights the line:
if (flash.initialize())
I should make the obligatory newbie – no great programmer disclaimer here – so if it's something obvious I'd appreciate a pointer – I'm keen to learn. I'm using Arduino 1.6.11 (on Windows 7). I seem to remember recently updating the SPI library – maybe that's it?

ChemE

#1
Looks like you are missing the SPIFlash library which you can download here: https://github.com/LowPowerLab/SPIFlash
Download and install this library in the same place that you put your RFM69W library and you should not have any more problems. Make sure you close your Arduino IDE before you try to compile again.  It only updates its library manager on startup.

DRCO

Hey thanks... I had the library in the Arduino IDE directory - and had been using it for some time. But taking your advice, I deleted the old and replaced it with one from the GitHub repository - and bingo! Everything is fine.

syrinxtech

Just to add one comment to the solution posted, don't forget to add:

#include <SPIFlash.h>

Simply adding the library doesn't add the header file.