Need to override a library #define from Web IDE

My Web IDE project uses Adafruit_SSD1306 and I need to #define SSD1306_128_32 and comment out SSD1306_128_64 from Adafruit_SSD1306.h. Since initial compilation processes “top down” I tried various combinations of defines in my firmware source before the #include, no luck. I’ve been using the Web IDE from the start, really like it, but is there any way to do this?
Thanks,
Tim

@sensorcheck, IDE libraries are read-only. You may want to use the ADAFRUIT_SSD1306_RK library which allows you to set the resolution in the constructor call. If you use this library, you will need to attach the Adafruit_GFX_RK to your project as well.

Another approach is to (manually) copy the Adafruit_SSD1306 library to tabs in your Web IDE project which will then allow you to edit the offending file.

1 Like

Another option is to not use the Web IDE and instead use Particle Workbench. You can use the Web IDE exporter to create a zip file of your project to download to your computer.

If you use Particle: Install Library to add a library, a copy of it is made in the lib directory. If you remove the entry from the project.properties file in the top level of your project, then you can make changes to the local copy of the library and your changes will be used.

2 Likes

Thank you both. I switched to the “RK” versions with the Web IDE.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.