Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EEPROMClass parametersStorage("eeprom", 0x500); #2

Open
Inth opened this issue Feb 15, 2023 · 3 comments
Open

EEPROMClass parametersStorage("eeprom", 0x500); #2

Inth opened this issue Feb 15, 2023 · 3 comments

Comments

@Inth
Copy link

Inth commented Feb 15, 2023

Hi there
when I try to compile the code I get an error for the line mentioned in the subject:

Error:
error: no matching function for call to 'EEPROMClass::EEPROMClass(const char [7], int)'
EEPROMClass parametersStorage("eeprom" , 0x500);

could you maybe suggest any soution ?

@joseluu
Copy link
Owner

joseluu commented Feb 16, 2023

Could you attach your library files ? EEPROM.h and EEPROM.cpp

here I am using the library EEPROM 1.0.3 found in Local/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/EEPROM

EEPROM.h begins with:
/*
EEPROM.h -ported by Paolo Becchi to Esp32 from esp8266 EEPROM
-Modified by Elochukwu Ifediora ifedioraelochukwuc@gmail.com
-Converted to nvs lbernstone@gmail.com

Uses a nvs byte array to emulate EEPROM

Copyright (c) 2014 Ivan Grokhotkov. All rights reserved.
This file is part of the esp8266 core for Arduino environment.

@joseluu
Copy link
Owner

joseluu commented Feb 16, 2023

EEPROM.zip

Here is the lib I am using

@Inth
Copy link
Author

Inth commented Feb 27, 2023

I manged to fix that by changing line 46:
EEPROMClass parametersStorage("eeprom", 0x500);
to
EEPROMClass parametersStorage("eeprom");

and changing line 118
if (!parametersStorage.begin(parametersStorage.length())) {
to
if (!parametersStorage.begin(0x500)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants