Adafruit_ILI9341 example problem - Digistump Oak not supported by libraries on Web IDE

I am simply trying to use the testgfx.ino example from the community library for the Adafruit ILI9341. I cannot coax the example to compile from the web IDE. I found a discussion on here that suggested adding a directory to the ILI9341 line so that it would look like so:

#include "Adafruit_mfGFX/Adafruit_mfGFX.h"    //this line is the same as the example
#include "Adafruit_ILI9341/Adafruit_ILI9341.h"    //someone suggest i change this line to this

but the error seems unrelated and this does not change anythign for me. error below:

Checking library 'Adafruit_ILI9341'...
Installing library 'Adafruit_ILI9341 0.9.4' to '/workspace' ...
Library 'Adafruit_ILI9341 0.9.4' installed.
testgfx.ino

/workspace/lib/Adafruit_ILI9341/examples/testgfx/testgfx.ino:18:43: fatal error: Adafruit_mfGFX/Adafruit_mfGFX.h: No such file or directory
 #include "Adafruit_mfGFX/Adafruit_mfGFX.h"

additionally, commenting them both out and adding them each via the library system give the same error.

any help is greatly appreciated. I am quite certain I am missing somethign simple here, since no one else seems to be facing this exact problem. I haven’t gotten to the point of flashing yet, but this is for a Digistump Oak.

Thank you.

1 Like

I take it back, it happens for every example in every library, i don’t seem to be able to compile any examples, nor can I include the files in my own code (by text or with the web IDE) I will keep trying examples, seems like something should work.

Thank you.

resultant error below, code is unchanged from the example:

Checking library ‘OneWire’…
Installing library ‘OneWire 2.0.1’ to ‘/workspace’ …
Library ‘OneWire 2.0.1’ installed.
DS18x20_Temperature.ino

/workspace/lib/OneWire/examples/DS18x20_Temperature/DS18x20_Temperature.ino:21:18: fatal error: DS18.h: No such file or directory
#include “DS18.h”

If you are using legacy libraries (not the new 2.0 libraries) you need to import the secondary libraries (e.g. Adafruit_mfGFX) manually.

If the library has already been migratedto 2.0, you need to make sure to use the latest version, since the previous ones will most likely still be 1.0


Update:
I’ve now tested the Adafruit_ILI9341 and after also importing Adafruit_mfGFX the (new) problem is that this include inside the lib doesn’t work anymore

#include "../Adafruit_mfGFX/Adafruit_mfGFX.h"

So it’ll be required to migrate the lib anyway - @mtnscott?

I am either confused or lost. I am using the Web IDE, and don’t seem to have the option to update the libraries. It is quite possible that they are the legacy versions, but I am not in control of that, I tried the other example for just that reason, to rule out it being a problem with only that lib.

is it possible that a fresh connection to the WEb IDE is directing me only to the legacy versions? how does one go about fixing this?

I am hoping to jump into the Arduino IDE later on, but this seems convenient for the short programs that I have been writing, I just had not realized that none of the libs would work.

for reference, the second example I used was version 2.0.1 of the onewire.h library. (I tried to compile the Address_Scanner.ino example, as well as re-importing the #includes.)

I really appreciate your help, I am still convinced that it is something naive and dumb on my part that has me in this pickle.

Thank you.

You picked a tricky moment for your first contact, but let that not dishearten you!
(and that’s definetly not your fault, you just need to lean back and wait for a fix)

Libraries 2.0 has only been released a few days ago and some of the teething problems will be ironed out soon.
Till then, you may have to take a slightly longer route.

  • Remove the Adafruit_ILI9341 lib from your project (or if you can’t du to another new glitch) start a new project.
  • create a new set of file tabs (Adafruit_ILI9341.h / .cpp) via the (+) icon in the top right corner of Web IDE
  • go to the repo of the lib ( https://github.com/mtnscott/Adafruit_ILI9341/tree/master/firmware )
  • copy-paste the contents of the .h/.cpp files into the respective tabs
  • change #include "../Adafruit_mfGFX/Adafruit_mfGFX.h" to #include "Adafruit_mfGFX/Adafruit_mfGFX.h"
  • try to build again

If you should still get errors, let us know

About the DS18 sample:
I have just noticed (with other libraries too) that the samples don’t build out the box.
But when you just change something on the code and save that change the sample builds - rather confusing, but give it a try


To keep track of that problem, I opened a GitHub issue here

Checking library ‘Adafruit_mfGFX’…
Installing library ‘Adafruit_mfGFX 1.0.2’ to ‘/workspace’ …
Library ‘Adafruit_mfGFX 1.0.2’ installed.
tftscreen.ino

In file included from /workspace/src/tftscreen.ino:2:0:
/workspace/src/Adafruit_ILI9341.h:19:43: fatal error: Adafruit_mfGFX/Adafruit_mfGFX.h: No such file or directory
#include “Adafruit_mfGFX/Adafruit_mfGFX.h”

I tried this before, where I added each thing that it was saying wasn’t found, but then you get into application.h, and it balloons from there. I think for now, I will have to use the arduino IDE to use libs, the online IDE works good for me otherwise, but it becomes difficult to work with different peripherals without lib support.

It does make me feel better to see that others are facing hte same thing. I like the idea of this, since it allows me to program these devices from any computer without installing anything, plus gives access to my code from wherever without having to ensure I have the latest version wherever I am working. hopefully this gets resolved soon.

Thank you.

Checking library ‘ThingSpeak’…
Installing library ‘ThingSpeak 1.3.0’ to ‘/workspace’ …
Library ‘ThingSpeak 1.3.0’ installed.
ReadLastTemperature.ino

/workspace/lib/ThingSpeak/examples/ReadLastTemperature/ReadLastTemperature.ino:16:24: fatal error: ThingSpeak.h: No such file or directory
#include “ThingSpeak.h”

This is more interesting because I am not using the ReadLastTemperature.ino example. I am trying to include thingspeak into my existing program. it is a pretty simple library. but claims that the example cannot find the library, what I don’t know is why it is looking at the example at all.

Hmm, can you then try #include "Adafruit_mfGFX.h" or #include <Adafruit_mfGFX.h> instead?

Checking library ‘Adafruit_mfGFX’…
Installing library ‘Adafruit_mfGFX 1.0.2’ to ‘/workspace’ …
Library ‘Adafruit_mfGFX 1.0.2’ installed.
tftscreen.ino
/workspace/src/tftscreen.ino:2:28: fatal error: Adafruit_mfGFX.h: No such file or directory
#include <Adafruit_mfGFX.h>

I guess the less than symbol needs special formatting to show up…
and:

Checking library ‘Adafruit_mfGFX’…
Installing library ‘Adafruit_mfGFX 1.0.2’ to ‘/workspace’ …
Library ‘Adafruit_mfGFX 1.0.2’ installed.
tftscreen.ino

/workspace/src/tftscreen.ino:2:28: fatal error: Adafruit_mfGFX.h: No such file or directory
#include “Adafruit_mfGFX.h”

Now I have done the same thing and got it to build.

There are only two lines in the header file that need to be replaced

#define pinLO(_pin)	(PIN_MAP[_pin].gpio_peripheral->BRR = PIN_MAP[_pin].gpio_pin)
#define pinHI(_pin)	(PIN_MAP[_pin].gpio_peripheral->BSRR = PIN_MAP[_pin].gpio_pin)

should now be

#define pinLO(_pin)	pinResetFast(_pin)
#define pinHI(_pin)	pinSetFast(_pin)

And this is how your project should look (ilitest.ino or testgfx.ino or tftscreen.ino doesn’t matter)

BTW: With a correct setup your includes in Adafruit_ILI9341.h can be any of the three ways I’ve suggest, just not how it’s in the lib originally

#include "Adafruit_mfGFX/Adafruit_mfGFX.h"     // works
#include "Adafruit_mfGFX.h"                    // works
#include <Adafruit_mfGFX.h>                    // works
#include "../Adafruit_mfGFX/Adafruit_mfGFX.h"  // does not work anymore

so I get this. same setup as far as I can tell, but I get the same error as before. I did fix the lines in the header file as well.

That’s odd in deed.
What system version are you targeting?
I was building for 0.6.1-rc.1

Maybe create a completely fresh project and copy/paste the sample .ino too.
That’s how I did it. It shouldn’t make a difference, but grabbing straws now :confused:

But I noticed that I don’t see this output even with the wrong include

Checking library 'Adafruit_mfGFX'...
Installing library 'Adafruit_mfGFX 1.0.2' to '/workspace' ...
Library 'Adafruit_mfGFX 1.0.2' installed.

I am installing on a digistump Oak, verson 1.0.6. I will try with a fresh ino and see what happens. I have also tried this with a completely unrelated project, nothing will compile if it has libraries attached. but if you got this one to compile, then it is just me somehow. I keep clearing the cache, just in case.

ya, even straws are worth trying at this point.

Thank you.

You have the form:

#include <lib/lib.h>

for the mfGFX lib in your code. Can you try without the angle brackets and just quotes or one of the other working forms?

I get this on a completely unrelated project, I think it is a poor example, since it appears that the library willnot support the Oak anyway, but the second error is the one that has me stumped, application.h shouldn’t fail. I copied the thingspeak library into my own .h and .cpp.

I will see if I can try some various combinations of syntax, but it seems like I have exhausted the options there.

Thank you.

This is interesting because it is just example code from a verified library, I did nothing but take the code and hit verify. I will copy in the library and see if it will compile.

but I get stuck unless I want to include the entire library hierarchy in each of my programs.

This is interesting, because I copied and pasted the example into a new program, then included the OneWire library, but the error mentions the other examples. This should not have anything to do with the examples. I’ve seen this a couple of times now. does not make sense to me.

Hi @justinmary

I am no longer sure what problem you are trying to describe or solve.

Yes, the Thingspeak library intentionally errors out if the platform ID is not one of the expected values. This is because there is some amount of platform specific code in the library.

For One Wire, you don’t seem to have included the DS18.h library in your project anywhere. There is not a way in the IDE that I know of for authors to say, “this example requires these two libraries” which I what I believe this problem to be.

Hello,

Thank you for your reply. I am trying to get any library to work in my code, from the web IDE. so far I have not been able to include any library. I started with the TFT screen, but started trying other, simpler, more verified code. the one wire seems to be a simple and widely supported library, but when I try to include it, it cna’t find the file. so i copy the code from the library and put it into my own files, then it can find them, but each example fails out when it requires the next library up. application.h is a common one for it to fail on.

Thank you.

https://community.particle.io/uploads/particle/original/2X/e/e18632e3f88e8ff4c105520e78b190e88fb6460a.png

note this example where I actually copied the DS18 library into my own program. it does make it work. but fails when it gets to application.h