Upgrade to AssetTrackerRK 0.1.6 from 0.1.3 --> compile erorrs

I have been using 0.1.3 for a number of months. Today I upgraded to 0.1.6 but when I attempt to compile with the 0.1.6 version, I get a number of errors of the “lib/LIS3DH/LIS3DH.h:20:2: ‘int16_t’ does not name a type”. I am using firmware 0.6.0 and the web development environment.

My code have #include “Particle.h” and #include "math.h"
The first line of my .ino is // This #include statement was automatically added by the Particle IDE.

Any ideas on what I am doing wrong? Thank you

I tried the example project 6 backward compatible api and didn’t encounter that error. The easiest workaround is probably to put

#include "Particle.h"

as the first line, before everything else.

1 Like

I released version AssetTrackerRK 0.1.7 that uses an updated version of the LIS3DH library with a LIS3DH.h that includes Particle.h so you won’t get that error if you don’t include Particle.h before LIS3DH.h.

1 Like

Thank you.
When I upgraded to 0.1.6, the library manger inserted the:
// This #include statement was automatically added by the Particle IDE.
#include <AssetTrackerRK.h>
as the first two lines in my code before the #include "Particle.h"
be well

I’ve been having trouble with AssetTracker on my Electron Asset tracker, so I’m trying rickkas’s upgrade.

I’ve pulled the libraries from those available in the WebIDE list.

I’m getting a compile error: ‘AssetTrackerRK’ does not name a type, is there a parameter that should be in the constructor?

#include "Particle.h"

// This #include statement was automatically added by the Particle IDE.
#include <LIS3DH.h>

// This #include statement was automatically added by the Particle IDE.
#include <AssetTrackerRK.h>

// Port of TinyGPS for the Particle AssetTracker
// https://github.com/mikalhart/TinyGPSPlus
//#include "TinyGPS++.h"


AssetTrackerRK t = AssetTrackerRK();

int transmittingData = 1;

void setup() {
    t.begin();
    t.gpsOn();
    t.updateGPS();
    Particle.function("tmode", transmitMode);
    Particle.function("batt", batteryStatus);
    Particle.function("gps", gpsPublish);
}

void loop() {
    t.updateGPS();
    delay(5000);
}

The object is named AssetTracker, to make it easier to switch from the official library. Just use:

AssetTracker t;
1 Like

Thank you, that fixed the compile error!

It did not however fix my GPS problem. Both AssetTracker.h and AssetTrackerRK.h are doing the same thing. I have 3 GPS boards, all three do the same thing. Any time I try to use the GPS I get a flashing LED: 10 fast cyan flashes, one long white, one (or 2) quick green… repeat.

When this happens I loose communication and have to go to safe mode. If I take the GPS out, everything else works fine.

Any idea what else I can try?

That's not a standard blinking sequence. You should take a video of it and submit it as a support ticket.

Thank you rickas7,

The problem appears to be in the physical Particle itself.

A new out-of-the-box Particle works correctly with the same firmware that isn’t working on the prototype I was having trouble with. (example code with AssetTrackerRK.h library for both Particles)

I will put in a support ticket as you suggest as soon as I can take a video.

Thank you for your help and support
Don

Hello @rickkas7

I’m trying to see your project but I can’t, can you share it ?, please.

Try the shorter link (without the direct file reference)

Or use the GitHub link icon in Web IDE
https://build.particle.io/libs/AssetTrackerRK/0.3.5/tab/AssetTrackerRK.cpp
image

thanks