   byte * data = (byte *) &_EncoderTicks; 
   // write the data to the serial
   Serial.write (data, 2);
+  //Serial.println(_EncoderTicks);
   //_EncoderTicks++;
 }
 

  uint32_t start = micros();
  while ( Serial.available() == 0 )
  {
    Serial.write(analogRead(c_EncoderPinA)/4);
    Serial.write(analogRead(c_EncoderPinB)/4);
    //Serial.write(analogRead(c_EncoderPinZ)/4);
    send_ticks();
    n++;
  }
  Serial.flush();
  Serial.println();

#define d_EncoderInterruptA 1

volatile bool _EncoderBSet;
volatile byte _EncoderTicks = 0;
long _last = 0;
double _speed = 0;
long _CentreCount = 0;
