   pinMode(INT2XM, INPUT);
   pinMode(DRDYG,  INPUT);
   
-  myservo.attach(9);
+  myservo.attach(9,740,2430);
+  myservo.write(0);
         
   analogReference(EXTERNAL);
   // begin() returns a 16-bit value which includes both the gyro 


uint32_t count = 0;  // used to control display output rate
uint32_t count2 = 0;  // used to control display output rate
uint32_t delt_t = 0; // used to control display output rate
float pitch, yaw, roll, heading;
float deltat = 0.0f;        // integration interval for both filter schemes

  float gxm = dof.calcGyro(GX.mean()) - gbias[0];
  float gym = dof.calcGyro(GY.mean()) - gbias[1];
  float gzm = dof.calcGyro(GZ.mean()) - gbias[2];
  //MadgwickQuaternionUpdate(axm, aym, azm, gxm*PI/180.0f, gym*PI/180.0f, gzm*PI/180.0f, mx, my, mz);
   MadgwickQuaternionUpdate(ax, ay, az, gx*PI/180.0f, gy*PI/180.0f, gz*PI/180.0f, mx, my, mz);
 //MahonyQuaternionUpdate(ax, ay, az, gx*PI/180.0f, gy*PI/180.0f, gz*PI/180.0f, mx, my, mz);

    // Serial print and/or display at 0.5 s rate independent of data rates
