-
Forum
-
Software/programming
-
ESP8266 Arduino IDE programming
-
eeprom_write_block error
eeprom_write_block error
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
8 years 2 weeks ago - 8 years 2 weeks ago #3578
by fr3d
hello everybody
I'm trying to compile "esp8266easyiot_temperature_humidity"
arduino IDE version is : 1.6.8
I 'm using a nodemcu 0.9 board.
I get an issue when i 've compiled esp8266easyiot_temperature_humidity.
"
eeprom.h not found" from "Esp8266EasyIoT.h" as I remember.
I changed it to EEPROM.h (found in C:\Program Files (x86)\Arduino168\hardware\arduino\avr\libraries\EEPROM\src\EEPROM.h)
now I got this error
C:\Users\severine\Documents\Arduino\libraries\Esp8266EasyIoT\Esp8266EasyIoT.cpp:234:95: error: 'eeprom_write_block' was not declared in this scope
eeprom_write_block((void*)&_nodeId, (void*)EEPROM_NODE_ID_ADDRESS, sizeof(uint16_t));
.
when i look into Esp8266EasyIoT.cpp or EEPROM.h I can't find
eeprom_write_block function.
As ggolgle is my friend I found this at
github.com/esp8266/Arduino/issues/414
#include "EEPROM.h"
//Call EEPROM.begin(4096); in setup()
void eeprom_read_block(uint8_t * data, uint32_t address, size_t len){
int i;
for(i=0; i<len; i++){
data[i] = EEPROM.read(address+i);
}
}
void eeprom_write_block(uint8_t * data, uint32_t address, size_t len){
int i;
for(i=0; i<len; i++){
EEPROM.write(address+i, data[i]);
}
EEPROM.commit();
}
ok but where must I put those lines ?
regards.
Last edit: 8 years 2 weeks ago by
fr3d.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
-
Forum
-
Software/programming
-
ESP8266 Arduino IDE programming
-
eeprom_write_block error
Time to create page: 0.206 seconds