 
   wheel_left.attach(MOTOR_OUT_L);
   wheel_right.attach(MOTOR_OUT_R);
+
+  pinMode(DEBUGGER_ATTACHED_PIN, INPUT_PULLUP);
+  manual_control = digitalRead(DEBUGGER_ATTACHED_PIN) == LOW;
 
   // pinMode(STOP_BUTTON, INPUT_PULLUP);
   // pinMode(DOWN_BUTTON, INPUT_PULLUP);

  dist_l = analogRead(DIST_IN_L);
  dist_r = analogRead(DIST_IN_R);
  dir = 0;
  dir += map(
    dist_r, 0, 300, 90, -90);

  dir += map(
      dist_f, 0, 300, 0, -90);



  left_mapped = map_speed(
    map(dir, -90, 0, 0, 100), 
    left_rw_max, left_zero, left_fwd_max);
  right_mapped = map_speed(
    map(dir, 0, 90, 100, 0),
    right_rw_max, right_zero, right_fwd_max);

  if (debug_out.check() == 1)
  {
    p(F("L %03d, F %03d, R %03d, left_mapped %03d, right_mapped %03d"),
      dist_l, dist_f, dist_r, left_mapped, right_mapped);
  }

  wheel_right.write(right_mapped);


int speed = 0;
int dir = 0;
int more_space = 0;
int dir_sign = 0;

bool manual_control = true;
byte byteRead;

Metro debug_out = Metro(100);

