 // declarations
 void setupBluetooth();
 bool setupAccelerometer();
+void errorStop();
 inline float getUnfilteredXAcc();
 inline float getXAccSample();
 void calibrateZeroVel();

unsigned long lastAccTime = 0;
float xVelocity = 0.0;

#if AccelerometerNewDataInterrupt
// tells that accelerometer data is ready (with interrupt)
volatile bool accDataReady = false;


// Stop and blink when error occurs
void errorStop() {
    analogWrite(ThrottleOut, 126); // zero throttle
    while (1) {
        digitalWrite(StatusLed, LOW);
        delay(1000);
