Adafruit_ILI9341 library ported to Particle IDE

There’s an Adafruit_ILI9341 library that apparently works for the 2.2 TFT (ILI9340) and for use on Particle boards.

Compiling gives this error though:

> lib/Adafruit_ILI9341/src/Adafruit_ILI9341.h:21:46: fatal error: ../Adafruit_mfGFX/Adafruit_mfGFX.h: No such file or directory
> #include "../Adafruit_mfGFX/Adafruit_mfGFX.h"

Does anyone know who can fix the libraries? I have found that some of the dependent libraries don’t link properly since Particle updated their web IDE.

The library doesn’t seem to be updated to libs 2.0 yet, and as such will need a little tweak. As the error so kindly pointed out, it can’t locate a dependency. In the .h file, change the following and give it another shot:

// Hack to get this to work in Spark IDE
//#include "../Adafruit_mfGFX/Adafruit_mfGFX.h" // comment this out
#include "Adafruit_mfGFX.h"  //uncomment this

You’ll need to copy&paste the two files manually though.

I think there already is a “repaired” lib published by @peekay123.
Just click the (i) icon to select the most recent version

Sorry, just checked, that’s not a lib of @peekay123 - who’s already migrated most (if not all) his libs.
So you need to do as Jordy said.

@mtnscott, any chance to address the issue

Yup, I converted that library to 2.0

It’s not yet public tho’

@ScruffR, it’s there or at least I see it in my list - v1.03

Nope, not for me.
0.9.4 is the latest even after clear cache and incognito mode)

I have a second account to check my own libs if they are visible to the public.

Have you got the lock :lock: icon next to the lib (or in the next line)?

That would be your library, the mfGFX one. This one, the ILI9341, depends on yours, yet still uses the ‘old’ format, and is thus having issues with the includes.

Oops… I’ll take a look.

1 Like

@ScruffR, that’s a clone of my repo. We would need to PR the owner or I can take ownership and upgrade.

I think that lib is as stale as the Piettech_DHT lib of the same member to which I requested take-over of ownership.
Just see the open issues.

@ScruffR, I’ll request ownership and update the library to 2.0. Adafruit has an update library that uses SPI transactions which our firmware now supports as well. I’ll adapt to use mfGFX.

1 Like

Thanks, @peekay123!


Any progress?

@csnbailey, I should have the update library by tonight. I was waiting on the SdFat library so I could keep the SD bmp to display example. I’ll ping you when it’s done.

1 Like

@csnbailey, I published the Adafruit_ILI9341 library! Unfortunately, the SdFat library was not playing nice with the SD image to TFT example so I had to remove it for now. :grinning:


great job porting this for us!

1 Like


F A N T A S T I C !! Thanks so much. I can’t wait to resume working on my project!

1 Like


Is there any way to use the old libs? Can’t compile anymore and my robots’ code has the Adafruit_ILI9341 library together with the SDFat one. I really need the sdcard functionality with the tft screen, it worked great before the migration…

Yes, you can import previous version of libraries.
If you state what dev environment you use, we can tell you how :wink: