Difficulty with adding library - Adafruit_Seesaw

The problem is that the library itself doesn’t require any of these libraries for itself to function, hence there are no dependencies in the library.properties file for them.
But the example does require these libraries. However, library examples (currently) can’t have their own project.properties file which would allow them to register dependencies.

But for Adafruit_GFX you shouldn’t include that but rather change it to Adafruit_mfGFX because the Adafruit_ST7735 library that’s available for Particle already brings its own copy of Adafruit_mfGFX.
Since the Adafruit_ST7735 library is rather old it’s missing this statement

#define INITR_MINI160x80  0x04

Hence you need to add this line to the example code, but since the library doesn’t know about that form factor and assumes 160x128 it’s rather likely that the display won’t properly work with that resolution.

The way out of that would be that you need to import these required secondary libraries yourself.

With all these changes the example builds for me (target Argon 0.8.0-rc.27)
https://go.particle.io/shared_apps/5c384693e359967913000711

Good practice to prevent this confusion would be to add a code block at the top of each example that clearly states the need for secondary libraries.

@bsatrom, I see this lib was contributed by you. Could you please add these comments and maybe lobby at Particle to allow for project.properties in library examples. I’ve repeatedly proposed that in the past :wink:

We also discussed the ability for Particle and Elites to take over outdated libraries, ST7735 might be such a candidate as a related issue is still unaddressed by the owner for almost a year

1 Like