Hi,
The same code that has not changed in months is now no longer building at all. I get errors for my code although it has not changed. When going to a simplified version of the code it does not work anymore as well. Below is my code
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_GPS.h>
// This #include statement was automatically added by the Particle IDE.
#include <AssetTracker.h>
#include <math.h>
//default interval
int intervalMinutes = 20;
// Creating an AssetTracker named 't' for us to reference
AssetTracker t = AssetTracker();
//Device number
char did[9] = "58965412";
//variable to hold JSON data
char data[200];
float gpsPrevLat;
float gpsPrevLon;
int decimal = 100000;
bool isMoving = false;
// Used to keep track of the last time we published data
long lastPublish = 0;
void setup() {
// Sets up all the necessary AssetTracker bits
t.begin();
// Enable the GPS module. Defaults to off to save power.
// Takes 1.5s or so because of delays.
t.gpsOn();
gpsPrevLon = 0.0f;
gpsPrevLat = 0.0f;
// Opens up a Serial port so you can listen over USB
Serial.begin(9600);
Particle.function("gps", gpsPublish);
}
void loop() {
// You'll need to run this every loop to capture the GPS output
t.updateGPS();
}
void deviceMoving(){
}
// Actively ask for a GPS reading if you're impatient. Only publishes if there's
// a GPS fix, otherwise returns '0'
int gpsPublish(String command) {
if (t.gpsFix()) {
Particle.publish("GPS", t.readLatLon(), 60, PRIVATE);
// uncomment next line if you want a manual publish to reset delay counter
lastPublish = millis();
return 1;
} else {
return 0;
}
}