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

Compile error on ESP32 in Adafruit_I2CDevice.cpp #2

Open
Neophyte69 opened this issue Jan 15, 2024 · 1 comment
Open

Compile error on ESP32 in Adafruit_I2CDevice.cpp #2

Neophyte69 opened this issue Jan 15, 2024 · 1 comment
Labels
Architecture: ESP32 ESP32 problem bug Something isn't working

Comments

@Neophyte69
Copy link

I am using an ESP32 Dev Board, and trying to include RTCLib.h, which, via the Adafruit_I2CDevice, includes Wire.h

I then moved the ESP32 Wire.h folder from the ESP32 installation folder to a temp folder on another drive.

This allowed compilation to go further than original Wire.h, however, it now fails on the Adafruit_I2CDevice.cpp with the errors below:

`c:\Users\Jacques\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp: In constructor 'Adafruit_I2CDevice::Adafruit_I2CDevice(uint8_t, TwoWire*)':
c:\Users\xxxxxxx\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp:17:20: error: 'I2C_BUFFER_LENGTH' was not declared in this scope
_maxBufferSize = I2C_BUFFER_LENGTH;
^~~~~~~~~~~~~~~~~
c:\Users\Jacques\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp:17:20: note: suggested alternative: 'BUFFER_LENGTH'
_maxBufferSize = I2C_BUFFER_LENGTH;
^~~~~~~~~~~~~~~~~
BUFFER_LENGTH

exit status 1

Compilation error: exit status 1`

@felias-fogg
Copy link
Owner

Hi,

with the new version V1.2.0 it should work. You can download the new version from the repo. It should be available soon via the Arduino library manager.

And I believe that you do not need to move the original Wire.h library. It should be enough to exit and restart the Arduino IDE in order to clear the compilation cache, where potentially an older compiled version of the original Wire library has been stored. At least, that worked in my case.

Best,
Bernhard

@felias-fogg felias-fogg added bug Something isn't working Architecture: ESP32 ESP32 problem labels Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture: ESP32 ESP32 problem bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants