Hi
I’m trying to use a library that conflicts with the framework’s library.
Namely, there’s a RotaryEncoder library in GitHub - adafruit/Adafruit_nRF52_Arduino: Adafruit code for the Nordic nRF52 BLE SoC on Arduino but I want to use GitHub - mathertel/RotaryEncoder: RotaryEncoder Arduino Library
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.
Thanks
Overriding it as stated in the docs works just fine.
[env:adafruit_feather_nrf52832]
platform = nordicnrf52
board = adafruit_feather_nrf52832
framework = arduino
lib_deps =
RotaryEncoder=https://github.com/mathertel/RotaryEncoder.git
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)
PACKAGES:
- 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 -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 12 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <RotaryEncoder> 1.3.0+sha.c8437bd [git+https://github.com/mathertel/RotaryEncoder.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\firmware.zip
Zip created at .pio\build\adafruit_feather_nrf52832\firmware.zip
======================== [SUCCESS] Took 6.81 seconds ========================
1 Like