Hi,
I’m a newbie and bought an Electron + ASSET3G260V2 Asset Tracker 3G Development Kit recently and don’t get accelerometer nor GPS data.
Device OS: 0.7.0
Library: ASSETTRACKER
Example: 1-gps-features.ino
int delayMinutes = 1; (for test purposes)
int accelThreshold = 9000;
$ particle serial monitor
Opening serial monitor for com port: "/dev/tty.usbmodem14311"
Serial monitor opened successfully:
Shook the kit, got no response after some time.
I then tried the 1-gps-features.ino example:
// loop() runs continuously
void loop() {
// You'll need to run this every loop to capture the GPS output
t.updateGPS();
// if the current time - the last time we published is greater than your set delay...
if (millis()-lastPublish > delayMinutes*60*1000) {
// Remember when we published
lastPublish = millis();
String pubAccel = String::format("pubAccel %d,%d,%d", t.readX(), t.readY(), t.readZ());
Serial.println(pubAccel);
Particle.publish("A", pubAccel, 60, PRIVATE);
Particle.publish("G", t.readLatLon(), 60, PRIVATE);
Events:
A pubAccel -258,-258,-258
G 0.000000,0.000000
Did I miss anything?