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

    timer = millis(); // reset the timer

    if (GPS.fix) {
      latitude = convertDegMinToDecDeg(GPS.latitude)*10000;
      longitude = convertDegMinToDecDeg(GPS.longitude)*10000;
      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*)&latitude, sizeof(latitude));
      buf_curr = stream(MARKER_LON, buf_curr, (void*)&longitude, sizeof(longitude));
      buf_curr = stream(MARKER_ALT, buf_curr, (void*)&altitude, sizeof(altitude));
      buf_curr = stream(MARKER_FLAG, buf_curr, (void*)&flags, sizeof(flags));

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

// XBee's DIN (RX) is connected to pin 9 (Arduino's Software TX)
SoftwareSerial XBee(10,9); // RX, TX

SoftwareSerial gpsSerial(8, 7);
Adafruit_GPS GPS(&gpsSerial);

void setup()
{
