   delay(1000);
   
   // Ask for firmware version
-  mySerial.println(PMTK_Q_RELEASE);
+  gpsSerial.println(PMTK_Q_RELEASE);
 
 }
 


  return decDeg;
}







    timer = millis(); // reset the timer

    if (GPS.fix) {
      payload.latitude = convertDegMinToDecDeg(GPS.latitude)*10000;
      payload.longitude = convertDegMinToDecDeg(GPS.longitude)*10000;
      payload.altitude = GPS.altitude;

      //set every byte in array to 0
      memset( buf_start, 0, MAX_BUF );

      //buf_start is pointer to first allocated space
      //buf_curr is pointer to next free space
      buf_curr = stream(MARKER_LAT, buf_start, (void*)ptr_payload->latitude, sizeof(payload.latitude));
      buf_curr = stream(MARKER_LON, buf_curr, (void*)ptr_payload->longitude, sizeof(payload.longitude));
      buf_curr = stream(MARKER_ALT, buf_curr, (void*)ptr_payload->altitude, sizeof(payload.altitude));
      buf_curr = stream(MARKER_FLAG, buf_curr, (void*)ptr_payload->flags, sizeof(payload.flags));

      //buffer size is the difference between the current and start pointers
      buf_size = buf_curr - buf_start;
