   I2CwriteByte(MAG_ADDRESS,0x0A,0x16);
   
    pinMode(13, OUTPUT);
-  Timer1.initialize(1000000);         // initialize timer1, and set a 1/2 second period
-  Timer1.attachInterrupt(callback);  // attaches callback() as a timer overflow interrupt
-  
+  //Timer1.initialize(1000000);         // initialize timer1, and set a 1/2 second period
+  //Timer1.attachInterrupt(callback);  // attaches callback() as a timer overflow interrupt
+
+  cmdPending = false;
   
   // Store initial time
   ti=millis();
 }
-
-
-
 
 
 // Counter

    Serial.print (mz,DEC);//(mz-700,DEC);  
  
  }
  
   



int16_t mx, my, mz;
uint8_t Mag[7]; 

void callback()
{ 
  intFlag=true;
