PlatformIO Community

Adafruit library

I am using the default Arduino WIRE library, which is not declared in P.ini connect to an SD card. Works perfectly. I am using a TFT display that requires ADAfruit GFX library. Whan I add the library to Plaformio.ini, adafruit/Adafruit GFX Library@^1.11.1, and compile it brings up SD errors.

lib_deps =
    adafruit/RTClib @ ^1.12.0
    bblanchon/ArduinoJson @ ^6.17.0
    adafruit/Adafruit Unified Sensor @ ^1.1.4
    adafruit/Adafruit BME280 Library @ ^2.1.1
    arduino-libraries/NTPClient @ ^3.1.0
    adafruit/Adafruit GFX Library@^1.11.1

Even if I remove the GFX library the errors remain with SD. If I copy and paste the code into a new workspace and compile it without the GFX library, apart from the obvious errors with the TFT, no other errors. I have not connected or used the TFT onboard SD card. Is there a conflict between the libraries?

What’s the full platformio.ini and code with which we can reproduce your error?

Also, when you remove a library from lib_deps, the library code still remains in the (hidden) .pio folder, so for a clean rebuild you have to remove that folder in the project.