In a header file I include the EEPROM library.
The header file follows:
#ifndef DPLANDEF
#define DPLANDEF
#include <Arduino.h>
#include <EEPROM.h>
#include "syssettings.h"
#ifdef DEBUG
#include <Serial.h>
#endif
/*
So funktioniert der DPlan:
*/
class DPlan
{
public:
static uint8_t getNextEvTime(uint8_t planID, uint8_t ctime); // gibt naechstes Event des Plans zurueck (ctime in 10min-Schritten)
// static uint8_t getNextEvSw(uint8_t planID, uint8_t ctime); // gibt Ausgabe des naechsten Events des Plans zurueck
static uint8_t getCurSw(uint8_t planID, uint8_t ctime); // gibt aktuelle Steuerwerte zum Plan zurueck (ctime in 10min-Schritten)
static uint8_t getCurSw(uint8_t planID, uint16_t cmtime); // gibt aktuelle Steuerwerte zum Plan zurueck (cmtime in 2s-Schritten)
private:
static const uint8_t EEPROMEvTimeBaseAdr; // Startadresse der Eventzeitpunkte im EEPROM
static const uint8_t EEPROMEvSwBaseAdr; // Startadresse der Eventdaten (Steuerwerte) im EEPROM
static const uint8_t EvNum; // Anzahl der Events pro Plan
static const uint8_t PlNum; // Anzahl der Plaene
};
#endif
This yields the following error during compilation.
Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard /var/folders/jl/nv1qvh6n569cxq9xxfd6dx980000gn/T/build4605486877500371361.tmp/display.cpp -o /var/folders/jl/nv1qvh6n569cxq9xxfd6dx980000gn/T/build4605486877500371361.tmp/display.cpp.o
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard /var/folders/jl/nv1qvh6n569cxq9xxfd6dx980000gn/T/build4605486877500371361.tmp/dplan.cpp -o /var/folders/jl/nv1qvh6n569cxq9xxfd6dx980000gn/T/build4605486877500371361.tmp/dplan.cpp.o
In file included from /var/folders/jl/nv1qvh6n569cxq9xxfd6dx980000gn/T/build4605486877500371361.tmp/dplan.cpp:2:0:
/var/folders/jl/nv1qvh6n569cxq9xxfd6dx980000gn/T/build4605486877500371361.tmp/dplan.h:5:20: fatal error: EEPROM.h: No such file or directory
#include <EEPROM.h>
^
compilation terminated.
Fehler beim Kompilieren.
I'm rather bewildered that the EEPROM library is not found, as I consider it a standard library and it shows up in the library menu of the IDE. My IDE-version is 1.6.5. Operating system is Mac OS 10.7.5 and Target is an arduino uno.