LowPowerLab Forum

Hardware support => Moteino => Topic started by: DRCO on September 21, 2016, 02:17:46 AM

Title: can't compile the struct send / receive examples
Post by: DRCO on September 21, 2016, 02:17:46 AM
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?
Title: Re: can't compile the struct send / receive examples
Post by: ChemE on September 21, 2016, 06:06:11 AM
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.
Title: Re: can't compile the struct send / receive examples
Post by: DRCO on September 21, 2016, 05:40:04 PM
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.
Title: Re: can't compile the struct send / receive examples
Post by: syrinxtech on September 21, 2016, 09:28:41 PM
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.