Hi, still on the beginners part of the road with the Asset Tracker kit.
I have tried copying and creating local versions of the Asset Tracker library files and compiling them with Particle Build (and also in Web IDE).
I have tried to do this with no changes to the library code, in both cases I get compiler failing with message:
(From Particle Build):
I have included in the screenshot the file/folder structure. as well as the Particle Build screen. I hope you can see it OK.
I placed the AssetTracker.h file in its own subfolder (AssetTracker) to mirror the
oops published before I finished.
… (continuing from my previous post) code for the include statement for AssetTracker.h
// Getting the library
#include "AssetTracker/AssetTracker.h"
I have read and tried to follow the long threads on the issues regarding include statements and folder structures. However I am a real newbie and the threads are at a level that go over my head (I gather there remains an issue in the Particle IDEs (Dev and Build) in regards to this).
However I do note also that others have got the Asset Tracker library working fine…
So looking for some advice to get past this obstacle.
Thanks.
Actually these terms apply to the same thing.
Particle Build == Web IDE the other IDE is called Particle Dev.
In Build you need to import the library as described here
https://docs.particle.io/guide/getting-started/build/photon/#using-libraries
In Dev you need to copy the library files into your project folder (might need to add a particle.include
file if you use subfolders) and use #include "AssetTracker.h"
without the folder name.
https://docs.particle.io/guide/tools-and-features/dev/#using-community-libraries
@ScruffR Thanks for the advice.
oops yes, got Dev and Build back to front in my post (a few times).
With your advice I have had success in getting the 1_GPS_Features code in the library to compile (using Dev).
From the zipped files I downloaded from GitHub, I had to:
(1) Rename 1_GPS_Features.cpp to 1_GPS_Features.ino
(2) In 1_GPS_Features.ino I removed the folder name in the include statement. (leaving #include “AssetTracker.h”).
(3) Remove the 2_Accelerometer.cpp from the project folder.
This then compiled OK.
Note: Not doing all of these things meant 1_GPS_Features would not compile.
1 Like