Welcome, Guest
Username: Password: Remember me

TOPIC: eeprom_write_block error

eeprom_write_block error 2 months 6 days ago #3578

  • fr3d
  • fr3d's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
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: 2 months 6 days ago by fr3d.
The administrator has disabled public write access.

eeprom_write_block error 2 months 6 days ago #3580

  • fr3d
  • fr3d's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
tryed with arduino 1.6.5 same result :(
The administrator has disabled public write access.
Time to create page: 0.143 seconds
Powered by Kunena Forum