     Serial.println(F("Ready\n"));
 }
 
+int readBattery(void){
+    return map(analogRead(BATTERY), 0, (1<<10)-1, 0, BATT_RANGE);
+}
+
+void displayBatteryStatus(void){
+    int battmV = readBattery();
+    display.print(F("Battery "));
+    display.print(battmV/1000);
+    display.print('.');
+    display.print(battmV/10 % 100);
+    display.println('V');
+}
+
 /*
  * Display current panorama status (photo index, etc)
  */

int horiz, vert;
volatile int running;


void setup() {
    Serial.begin(38400);

    horiz_motor.setMicrostep(32);
    vert_motor.setMicrostep(32);

#define CAMERA_FOCUS 0
#define CAMERA_SHUTTER 1

#define BATTERY A0

#define JOYSTICK_X A3
#define JOYSTICK_Y A2
#define JOYSTICK_SW 2

#define REMOTE_IN 3
#define COMPASS_DRDY 4
#define MPU_INT 7

#define MOTOR_STEPS 200
#define MOTORS_ON 13
