 void setup() {
   Serial.begin(SERIAL_PORT_SPEED);
   Wire.begin();
+  remoteState = SBTSailbotModelStateManualControl;
   imu = RTIMU::createIMU(&settings);                        // create the imu object
 
   Serial.print("ArduinoIMU starting using device ");

      memcpy(&buffer[2], &heading, sizeof(heading));
      RFduinoBLE.send((char*)&buffer, sizeof(float) + 2);
    }
  } else {
    char buffer[2];
    buffer[0] = SBTSailbotModelHeaderState;
    buffer[1] = SBTSailbotModelStateNoIMU;
    RFduinoBLE.send((char*)&buffer, 2);
  }
}


void RFduinoBLE_onConnect() {
  Serial.println("Bluetooth connect");

  SBTSailbotModelStateRecoveryMode,
};

#define DATA_PACKET_SEND_INTERVAL  500
#define  SERIAL_PORT_SPEED  9600

unsigned long lastDataPacketSent;

char state;
char remoteState;
int failedIMUReadCount;

Servo tillerServo;
Servo sheetServo;
