Libraries not found in web IDE

Hi there,

I’m experimenting with using this for a project and I’ve had some trouble with the web IDE. When I use the library search tool to find a library (like the Adafruit_TCS34725) it automatically adds it yet will not compile. I get the error that says the library is missing. This must be a common thing, no? Am I making some boneheaded mistake?

I’m using this at the top of my file:
// This #include statement was automatically added by the Particle IDE
#include "Adafruit_TCS34725/Adafruit_TCS34725.h"

And getting the error:

 #include "Adafruit_TCS34725/Adafruit_TCS34725.h"```

Any ideas?

Can you try out the TCS34725.INO sample that comes with the library?

BTW: Have you had the include statement added for you (as the comment suggests) of have you just copied both lines from another project?

I’ll try out the .ino example, good call. It appears ANY library fails when it’s at the top of the stack. Whichever library is first is not found when I verify.

I let the IDE include it for me, didn’t copy/paste. But now I’ve moved it all over tarnation trying to get it to work, so maybe I’ll start from scratch and try again.

There is an issue with the preprocessor.
You could try adding a blank first line (or remove it if there is one).
Or remove the leading comment.
Or use #pragma SPARK_NO_PREPROCESSOR

The web IDE is terrible. I’ve had instances where I would include a library, write some code, and it would fail to compile claiming the library was never defined. Then, when I went and loaded the example, it compiled fine. I’ve had it not save work, or magically rollback code to another point I had saved on returning to the code.

The desktop IDE is an absolute joke, as well. Why can’t we pull libraries down? Why do I have to dig through the online IDE to find a library I need and then go to the github (which may not be the correct version of the library I am looking for) to then download it into a flattened folder?

The entire process seems kludged together and half baked at best. Where’s our direct communication between devices? Why does the thing need to be online in order to run code?

I currently have three awesome pieces of hardware sitting on my bench which I will not touch again until something major changes. The whole ecosystem sucks.

It's not as good as it could be, but if you know the traps (which are on the ToDos for ironung out), you can avoid falling into them

It doesn't.

That has changed a while back.

This is work-in-process but far from that!


How does this help the OP?
Was this constructive criticism? I think not.

2 Likes

Apologies, I’m very frustrated with the state of the ecosystem. I’ve gone from being very excited about the Photon (and the Electron) to being fed up with setback after setback. You’re absolutely correct, this was not the place to vent these frustrations. The users here have always been very helpful, and this was a terrible way to repay that kindness.

The IDE needs some desperate help. I would contend your second point (breathing green) but this isn’t the place for that, either.

Regards

2 Likes

@quadband,

[quote=“quadband, post:7, topic:19032”]
I would contend your second point (breathing green)
[/quote] You have full control over connectivity using the SYSTEM_MODE() settings in your code, including user code running without any, some or all connectivity.

I completely support your frustrations with the IDE and libraries. This has been a sensitive point for the Elites for a while. Personally, I have chosen to compile with a local toochain coupled with CLI and DEV. The ability to centralize and automatically pull/use libraries is sorely lacking but not a show stopper IMO.

Understand that Particle has done some amazing stuff given their small team. So much so that other platforms are joining the Particle ecosystem (Duo, Oak, Bluz). With few resources and so much work, the Particle team has, to the detriment of other works, been laser focused on the release of the Electron. Rest assured that once completed the Team has committed to refocus their attentions on the neglected areas including the IDE and libraries. The addition of other partners is not hurting either, providing some healthy “push” :wink:

4 Likes