 #define d_EncoderInterruptA 1
 
 volatile bool _EncoderBSet;
-volatile long _EncoderTicks = 0;
+volatile int _EncoderTicks = 0;
 long _last = 0;
 double _speed = 0;
 long _CentreCount = 0;

#include <arduino2.h>

#define c_EncoderPinA A0
#define c_EncoderPinB A1
#define c_EncoderPinZ A2

#define d_EncoderPinZ 2
#define d_EncoderPinA 3

  digitalWrite(A2, HIGH);
  
  attachInterrupt(d_EncoderInterruptA, HandleInterruptA, RISING);
}
 
void loop()
