     while (mySerial.available()) {
         char c = GPS.read();
 
-        // lets echo the GPS output until we get a good clock reading, then lets calm things down.
-        //if (!hasGPSTime) {
-        //   Serial.print(c);
-        //}
-
         if (GPS.newNMEAreceived()) {
-            Serial.println(GPS.lastNMEA());
+            //Serial.println(GPS.lastNMEA());
             GPS.parse(GPS.lastNMEA());
 
             //Serial.println("my location is " + String::format(" %f, %f, ", GPS.latitude, GPS.longitude));


unsigned long lastMotion = 0;
unsigned long lastPublish = 0;
time_t lastIdleCheckin = 0;

#define PUBLISH_DELAY (60 * 1000)

     Particle.publish("trk/dev", devJson, 60, PRIVATE);


    publishLevel();

//          int value = rand() * 100;
//     String sensorJson = String("{")
//            + "\"level\":" + String::format("%d", value)
//            + "}";
//     Particle.publish("trk/level", sensorJson, 60, PRIVATE);
}



void publishLevel() {
    int levelValue = getLevelReading();

    accel.read();
    float aX = accel.x;
    float aY = accel.y;
    float aZ = accel.z;


     String sensorJson = String("{")
            + "\"level\":" + String::format("%d", levelValue)
            + ",\"tempF\":" + String::format("%d", 0)
            + ",\"x\":" + String::format("%.2f", aX)
            + ",\"y\":" + String::format("%.2f", aY)
            + ",\"z\":" + String::format("%.2f", aZ)

            + "}";
     Particle.publish("trk/env", sensorJson, 60, PRIVATE);
}


int getLevelReading() {

    //
    int emptyLevelValue = 3500;
    int fullLevelValue = 1800;
    // about 2 inches of water ->
    //int levelValue = analogRead(D0) - 2434;

    //delay(50);
    int levelReading = analogRead(A4);
    int levelValue = map(levelReading, fullLevelValue, emptyLevelValue, 0, 100);
    levelValue = 100 - levelValue;  // flip it

    Serial.println("water level is " + String(levelReading) + " percentage full is " + String(levelValue));

    return levelValue;
}

int crc8(String str) {
  int len = str.length();
