PlatformIO Community

Edit Arduino library file installed using library manager


I need to edit an include .h file in an arduino library installed using library manager.
More precisely, I need to change something like the line #define I2C_ADDRESS 0x3c
to #define I2C_ADDRESS 0x3a.

How do I do this?

Thanks in advance.

See a related note: How to amend a file in a library - #2 by jcw

If that can’t be used, I’d create a copy of the library in your lib/ dir, which should cause PIO to find that one instead of downloading it. Then you can change that copy.

If I create a copy, can I then just change the #include to point to the copy?

Try advanced scripting. There is example for similar case Advanced Scripting — PlatformIO latest documentation