 const int R_FORWARD = 5;
 const int R_REVERSE = 3;
 
-const int pan_servo = 11;
-const int tilt_servo = 10;
+const int pan_servo = 10;
+const int tilt_servo = 11;
 
-const int pan_center = 86;
-const int tilt_center = 113;
+const int pan_center = 113;
+const int tilt_center = 86;
+
+const int pan_min = 10;
+const int pan_max = 170;
+
+const int tilt_min = 10;
+const int tilt_max = 180;
+
+int pan_pos = pan_center;
+int tilt_pos = tilt_center;
 
 Servo pan;
 Servo tilt;

    analogWrite(R_REVERSE, 0);
}

void log(String message) {
    if (DEBUG) {
        Serial.print(message);

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

    // Enable both drive motors
    digitalWrite(L_ENABLE, HIGH);
    digitalWrite(R_ENABLE, HIGH);
    
    init_servos();
    stop_servos();
}

void loop() {
    read_commands();
}

void init_servos() {
    pan.attach(pan_servo);
    tilt.attach(tilt_servo);

    pan.write(pan_center);
    tilt.write(tilt_center);

}

void stop_servos() {
    delay(50);

    pan.detach();
    tilt.detach();

    delay(50);

    digitalWrite(pan_servo, LOW);
    digitalWrite(tilt_servo, LOW);
}

void read_commands() {
