Good evening
I am trying to work with the internal Eeprom of an Arduino Mini Pro
I red taht document and I tried to reproduce it
https://www.arduino.cc/en/Reference/EEPROMPut
I created a library and I have those two files
wi808.h and wi808.cpp.
I did as the following
In the file wi808.ino, I added that line
#include <EEPROM.h>
In the files wi808.h and wi808.cpp, I added that line
#include "EEPROM.h"
In my file WI808.h, I added
struct MyObject {
float field1;
byte field2;
char name[10];
};
Just above my class
class SI808{
Then in my 808.cpp, I added
MyObject customVar = {
3.14f,
65,
"Working!"
};
EEPROM.put(0,customVar);
For now, I would ilke to save "Working" but later i would like to save a text of 80 caracters
Then I tried to save "Working at the address 0
When I compile, I have that error message:
In file included from /Users/pierrot/Documents/Arduino/libraries/Wi808/Wi808.h:18:0,
from wi808.ino:2:
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/EEPROM/EEPROM.h:145:8: error: declaration does not declare anything [-fpermissive]
static EEPROMClass EEPROM;
^
Erreur lors de la compilation.
At the line 19 of my wi808.h file, I have that code
#define EEPROM
#ifdef EEPROM
#include "EEPROM.h" // line 19
#endif
Someone can tell me , how I exactely do it?
Excepted of that error, did I start correctely?
How should I do better?
Thank a lot