-#include <Adafruit_Sensor.h>
+f#include <Adafruit_Sensor.h>
 #include <Adafruit_LSM303_U.h>
 #include <Adafruit_9DOF.h>
 #include <Adafruit_L3GD20_U.h>

    Serial.println("");
  }

  mag.getEvent(&mag_event);
  if (dof.magGetOrientation(SENSOR_AXIS_Z, &mag_event, &orientation))
  {
    dtostrf(orientation.heading, 5, 2 , buf);
    sprintf(buffer, "^%s~%s~%s~", "GYRO", "heading", buf);
    Serial.write(buffer);
  }
  if (debug) {
    Serial.println("");
  }
}

void setup() {

Adafruit_9DOF                dof   = Adafruit_9DOF();
Adafruit_LSM303_Mag_Unified   mag   = Adafruit_LSM303_Mag_Unified(30302);
int i;
int compassCount = 0;
double compassTotal = 0;


void printData() {

  int dif;
  blocks = -1;
  char buffer[100];
