     toLog = toLog + String(buffer);
   }
 
+  SerialUSB.print("Transmit on DR");
+  SerialUSB.print(dr);
+  SerialUSB.print(" coordinates ");
+  SerialUSB.print(sodaq_gps.getLat(), 13);
+  SerialUSB.print(" ");
+  SerialUSB.print(sodaq_gps.getLon(), 13);
+  SerialUSB.print(" altitude ");
+  SerialUSB.print(sodaq_gps.getAlt(), 1);
+  SerialUSB.print(" and HDOP ");
+  SerialUSB.print(sodaq_gps.getHDOP(), 2);
+  SerialUSB.print(" hex ");
   SerialUSB.println(toLog);
+
   digitalWrite(LED_BLUE, LOW);
   myLora.txBytes(txBuffer, sizeof(txBuffer));
   digitalWrite(LED_BLUE, HIGH);
+
+  // Cycle between datarate 0 and 5
+  dr = (++dr) % 6;
+  myLora.setDR(dr);
   SerialUSB.println("TX done");
 }

    // initialize GPS
    sodaq_gps.init(GPS_ENABLE);

    // myLora.setDR(0); //set the datarate at which we measure. DR7 is the best.
    pinMode(LED_BLUE, OUTPUT);
    digitalWrite(LED_BLUE, HIGH);
    pinMode(LED_RED, OUTPUT);


  while(sodaq_gps.getLat()==0.0)
  {
    SerialUSB.println("Lattide still 0.0, doing another scan");

    digitalWrite(LED_RED, LOW);
    sodaq_gps.scan();
    digitalWrite(LED_RED, HIGH);
