-
Notifications
You must be signed in to change notification settings - Fork 22
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
Can't find EEPROM.h in Arduino IDE #24
Comments
Hi @EdwardDeaver, |
Hi @gromeck , I'm having similar problems, both with WIFI and EEPROM. I'm getting the following compile errors:
... and many other EEPROM was not declared in this scope errors All libs are installed. I assume something goes wrong with the include sequence, as the compiler does not complain about a missing lib, but a missing declaration in this scope. Any hint is appreciated. I'm using Arduino IDE 2.3.2 on win10. |
Try adding
to the file But I can't explain why I don't get this error :-/ |
Are you sure that you've installed the |
First I installed only the esp32, later I also installed the Arduino ESP32 Boards, to test if this could solve the problem. Thus I now have both installed, but only a ESP32 board is selected. |
unfortunately the error remains: then later:
which looks really strange that WiFi is not declared in wifi.cpp - I assume something really strange is going on here. |
Please, deinstall the Additionally, open |
Thanks for your time! Arduino ESP32 Boards are removed. Here is the full compiler log: (too long to include in comment) |
This compile log lacks a lot of information. My log starts with the target specification of the the compile:
For each library a section with the selected one is output:
I was not aware that compiling under Windows and Linux is that different. Did you try the examples which are offered in the IDE? |
Hi @gromeck, your comment about Linux guided me to the solution. The problem is caused by using the file names In parallel I tried to compile the code also using |
Hmm, ok, that's wierd. This could be an issue of the Arduino IDE 2. Do you know about filename rules there?
Could you please check, if this is necessary? The libs use other flag name/rules and should not collide (this would otherwise be also the case under Linux). |
You are right! I changed MY_EEPROM_H and MY_WIFI_H back to EEPROM_H and WIFI_H and it compiles without any problems. I assume the file name problem is caused by the fact that windows files names are case insensitiv. : https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity This probably leads to the wierd error messages. |
Ok, thanks for this check.
Yes, and this causes some problems even within the IDE 2 (see https://github.com/arduino/arduino-ide/issues?q=is%3Aissue+is%3Aopen++case+sensitive). |
I'm not sure if this is an Arduino issue. In the meantime I succeeded to compile your code in Visual Studio Code and PlatformIO. There, the same problems occur and after modifying the filenames as well as the watchdog code everything compiled OK. I've left some comments about this in the corresponding issue on PlatformIO. |
I opened the project in the latest Arduino IDE and I'm getting these errors:
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp: In function 'void EepromInit(int)':
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp:36:3: error: 'EEPROM' was not declared in this scope; did you mean 'EPERM'?
36 | EEPROM.begin(_eeprom_size);
| ^~~~~~
| EPERM
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp: In function 'void EepromClear()':
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp:65:5: error: 'EEPROM' was not declared in this scope; did you mean 'EPERM'?
65 | EEPROM.write(n, 0xff);
| ^~~~~~
| EPERM
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp:66:3: error: 'EEPROM' was not declared in this scope; did you mean 'EPERM'?
66 | EEPROM.commit();
| ^~~~~~
| EPERM
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp: In function 'int EepromRead(int, int, void*)':
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp:80:9: error: 'EEPROM' was not declared in this scope; did you mean 'EPERM'?
80 | if (EEPROM.read(addr + n) != 0xff)
| ^~~~~~
| EPERM
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp:87:28: error: 'EEPROM' was not declared in this scope; did you mean 'EPERM'?
87 | ((byte ) buffer)[n] = EEPROM.read(addr + n);
| ^~~~~~
| EPERM
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp: In function 'void EepromWrite(int, int, const void)':
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp:102:5: error: 'EEPROM' was not declared in this scope; did you mean 'EPERM'?
102 | EEPROM.write(addr + n, ((byte *) buffer)[n]);
| ^~~~~~
| EPERM
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/eeprom.cpp:107:3: error: 'EEPROM' was not declared in this scope; did you mean 'EPERM'?
107 | EEPROM.commit();
| ^~~~~~
| EPERM
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/ntp.cpp: In function 'void NtpSetup()':
/Users/$USERNAME/Downloads/BLE-Scanner-main/BLE-Scanner/ntp.cpp:178:7: error: 'WiFi' was not declared in this scope
178 | if (WiFi.hostByName(_config_ntp.server, _ntp_ip)) {
| ^~~~
exit status 1
Compilation error: 'EEPROM' was not declared in this scope; did you mean 'EPERM'?
The text was updated successfully, but these errors were encountered: