Library include error in Web IDE

@Herner, indeed is a library issue due to the changes in the relative url for the libraries. Let me see if i can push some updates to the Thermistor library and have it fixed.

Thanks for letting us know and sorry about that!


@Herner, there’s some complicating issues that needs to be resolved on the backend but the fix for now is:

1.) Do not use the example app in the Thermistor library

2.) Include it in your app and change the #include statements to become

#include "application.h"

// This #include statement was automatically added by the Spark IDE.
#include "Thermistor/Thermistor.h"

This should compile fine. If you need the elapsedMillis library, simply add to your code again via the libraries tab.

Let me know if you are stuck and i’ll see what can be done.

Cheers! :wink:

Hey @Herner , thanks for reporting the issue, and @kennethlimcp , for jumping in to help out!

When we launched the library system, we deliberately made it a community managed thing that anyone could contribute to rather than a Spark managed approach. As a result of this decision, the quality of some libraries is not where we’d like it to be, and folks stumble on libraries whose examples that don’t work as expected, or don’t even compile.

Both @kennethlimcp and @peekay123 have proposed solutions to this that I’m hoping we can work on in the coming weeks. Given the current confusion, it seems like we need to find a way to have more control over publicly available libraries in the IDE. We’ll keep you posted.



1 Like

Thanks for the update. MY impression was libraries were just that. I tweaked and was able to get libraries working and will write my own thermistor library since the one on spark is not accurate enough for me. I am going to use Bcoefficient and steinhart and port over my arduino code.

Tks guys for helping

I was able to get it to work I am not entirely sure how accurate it is. I did end up using the Thermistor inclusion. I will start a new thread on thermistor.h as it could help others.

Im reviving this topic as I appeared to have walked smack back into a similar issue;

In using the WebIDE I wanted to include the ADAFruit_PN532 LIbrary and use the example readMifareClassic.cpp code.

In verifying the code it reports that the .h file for the AdaFruit Library cannot be found.

readmifareclassic.cpp:34:27: fatal error: dafruit_PN532.h: No such file or directory

The Library is in use across 14 other projects, and it just occurs to me to see if I can get those projects to verify; so I will come back to that but for now I have tried refreshing the browser; and recreating the project and adding the library.

I may either be missing a trick or the Web IDE is unable to find the .h despite finding the library.

I shall keep on tweaking this forward; if I solve it before any suggestions I’ll come back; possibly my next step is to look at seeing how another library works and then track back along this Community Library if they work.

Thank you in advance to those who took time to read/reply

Check your include statement.
It needs to look like this

#include "Adafruit_PN532/Adafruit_PN532.h"

Your error message is indicating you’re missing the sub directory and a leading ‘A’

Excellent news; I thought I might be heading in the right direction so thank you for picking that up for me. At least now Verify points to a new error.

Which leads me to ask if I should go through that library and tidy it up so that it works for other new users like me … again thanks for the input . Im off to resolve this one next

…/wiring/inc/spark_disable_wlan.h:30:2: error: #error This header (spark_disable_wlan.h) has been deprecated. Please use SYSTEM_MODE instead “”.
#error This header (spark_disable_wlan.h) has been deprecated. \

Seems I can find that in the docs so I’ll crack on

As it seems this library is ancient and hasn’t been updated for ages since SYSTEM_MODE() has been there for quite a while now.
Could you ping the owner of the library on his GitHub and/or file a PR there, since only the owner of the contributed library can update it in the public repo.
If he doesn’t respond let us know, Particle is still in need of a process to take over ownership for orphaned/abanoned libraries but also needs to know which are.

I will do , ( whats a PR ? ) cheers

I’m over here working on PN532 for a local community project; originally I was going down the Arduino route but when I saw the CEO answer a question on Quora pointing to the Photon I grabbed a dev board to experiment with and Frankly I think this will, If I can crack getting PN532 updated, be a better presentation in which to show a local STEM event how to build some IOT devices. top marks therefore in responding to questions. Cheers ScruffR

1 Like

Sorry - it’s a Pull Request.
When you fork a library and make changes that might be useful for the original too, you file a PR and the owner might pull in your changes into his code.


@loudmouthman, if that’s the library from my repo then it IS old. I would gladly update it if you let me know what changes you want. :smile:


It might be ; the LIbrary says “ADAFRUIT_PN532 0.0.1” and when I view on Github I see .

So far in debugging I have been tweaking readMifareClassic with help from walking around the this communit comments; Im not sure how to share my current code here but from my own comments in my code I can tell you that I have

Added AdaFruit_PN532/ to the Include for Adafruit_PN52.h ( ScruffR )
Commented out spark_disable_wlan as its deprecated;
Added particle.process within the core While loops as it was causing the breathing green error.
Added SYSTEM_THREAD(ENABLED) to help ensure photon processes are not blocked;
Commented out checking for Serial.Available it was just looping there forever.

Now im down to getting it to see the PN532 board; im using the Big Red Square Shield which probably has a proper name somewhere but I can link to it if you’re unsure.

Currently Its not seeing the board so my next step was to walk back through the code for spotting a PN532 board running as i2c and ensuring that its evening listening/talking.

I have the PN532 Libraries working in the arduino so I was using that as a reference point; getting these to work in Photon would be a bonus.

Specifically I have a local community/STEM project I am building towards and getting this to work will mean we can use a collection of Photons at a local event and get kids to build and play with NFC and Photons.

Count me in as saying yes please to any help and to offering my own code/time to improve this library and maybe keep it upto date and using some of the Photons features;

thank you in advance.

When @peekay123 offers to brush up his library found here

I’d definetly pick up on his offer - you’d hardly find better support than his.

hopefully I have . Though thats not the Library I can see when searching for Libraries in use so if it can be brushed up or accessible that would be great; currently searching on Pn532 brings up the other developers library ; thanks again for the help.

I’d say it is - look at the comment block at the top of the files :wink:

I think rahatmaini has just taken Paul’s library changed the directory structure and added some meta files to “contribute” it to Build.

1 Like

ooohhh… one of THOSE code streaks. Well yes if I can help @peekay123 in bringing the Library back up to snuff it will go a along way to helping my own project move along; Currently I cant even get the board recognized though the Arduino picks it up; Im working back over stuff which no doubt Peekay123 has already trundled over in the past.

@loudmouthman, often a device not being recognized is caused by wiring. That (and many other) libraries need some lovin. I’d be glad to help!

@peekay123 I shall take you up on that offer; I found the original longer thread on the topic of NFC and your work pulling it all forward; Ive ensured my wiring reflected this ; My NFC reader board looks just like the red one in the picture and its reading on the Arduino okay; so looking at the readmifareClassic code it looks like D3 and D4 are used in place of D0,D1 ( probably some ‘contributing there as @ScruffR suggested’ ) Ive attempted various cable swaps I may go down the pull up route with the resistors though its not required on the arduino it might be needed for this board. Im going to take a break for tonight as I have been in and out of the build screen for most of the afternoon. I shall come back with some photos of the configuration and also look at maybe adding a 10K pull up on the circuit as it appears to be suggested in at least one of the photos.

@loudmouthman, the pull-ups are ABSOLUTELY necessary with Particle devices (Arduinos have them onboard). You can use 4.7K or 10K ohm resistors. Make sure to pull the up to the Vcc of the NFC board (most likely 5v) and be sure to have the Photon and NFC grounds tied. :wink:


Excellent I shall get on with that in the morning and in the meantime I’ll kick off the converasation going forward over there: PN532 NFC Library [PORTED] on the Thread which I was looking at.

1 Like