PlatformIO Community

Use different library from the framework's one

I’m trying to use a library that conflicts with the framework’s library.
Namely, there’s a RotaryEncoder library in but I want to use
When I build the code it loads the Adafruit one.
Maybe setting lib_ignore could work, but I didn’t manage to make that work.

Overriding it as stated in the docs works just fine.

platform = nordicnrf52
board = adafruit_feather_nrf52832
framework = arduino
lib_deps = 

With the supplied example as src\main.cpp.

“Verbose Build” shows the path of all used libraries…

PLATFORM: Nordic nRF52 (5.0.1) > Adafruit Bluefruit nRF52832 Feather
HARDWARE: NRF52832 64MHz, 64KB RAM, 512KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
 - framework-arduinoadafruitnrf52 1.2100.201028 (21.0)
 - tool-sreccat 1.164.0 (1.64)
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 12 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <RotaryEncoder> 1.3.0+sha.c8437bd [git+] (C:\Users\Max\Documents\PlatformIO\Projects\adafruit_nrf52_test\.pio\libdeps\adafruit_feather_nrf52832\RotaryEncoder)
Building in release mode

… which is correct, otherwise it would be from like C:\Users\<user>\.platformio\packages\framework-arduinoadafruitnrf52\libraries\RotaryEncoder.

And the examples compiled normally.

Checking size .pio\build\adafruit_feather_nrf52832\firmware.elf
Building .pio\build\adafruit_feather_nrf52832\firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   5.0% (used 3292 bytes from 65536 bytes)
Flash: [          ]   4.5% (used 23836 bytes from 524288 bytes)
Building .pio\build\adafruit_feather_nrf52832\
Zip created at .pio\build\adafruit_feather_nrf52832\
======================== [SUCCESS] Took 6.81 seconds ========================
1 Like