 boolean ledCmdOn = false;
 boolean IsConnected = false;
 
-// drive vars
+// RoboClaw //
+#define RC_ADDR 0x80
+#define RC_RX_PIN 12
+#define RC_TX_PIN 11
+RoboClaw roboclaw(RC_RX_PIN, RC_TX_PIN);
+
+// propulsion vars
 #define MOTOR_VELOCITY_0 64
 #define MOTOR_VELOCITY_MAX 63
 byte motor1 = MOTOR_VELOCITY_0;

// ex: B
void battery()
{
  //unsigned int voltage = (unsigned int)roboclaw.ReadMainBatteryVoltage(RC_ADDR, 0);
  //int voltage = analogRead(0) * 4.8828;
  unsigned int voltage = (unsigned int)analogRead(0) * 312 >> 6;
  Serial.write('B');
  Serial.println(voltage);
}

  pinMode(4, INPUT_PULLUP);
  pinMode(5, INPUT_PULLUP);
  pinMode(6, INPUT_PULLUP);
  
  // power management pins //
  pinMode(AUX_PIN, OUTPUT);
  pinMode(MOTORS_PIN, OUTPUT);
  pinMode(UPS_PIN, OUTPUT);
  pinMode(BATTERY_PIN, OUTPUT);
  digitalWrite(AUX_PIN, LOW);
  digitalWrite(MOTORS_PIN, LOW);
  digitalWrite(UPS_PIN, LOW);
  digitalWrite(BATTERY_PIN, LOW);
  pulsePin(AUX_PIN, 20);
  
  // host communication //
  Serial.begin(38400);
  
  // propulsion (RoboClaw) //
  driveInit(true);
  driveInit(false);
}
