     switch (translate_ir()) {
       case 1: flash_beat(true, current_millis); break;
       case 2: flash_beat(false, current_millis); break;
-//      case 7: test_speed(75); break;
       default: break;
     } 
     irrecv.resume();

    default: return -1; // other button
  }
}

void test_speed(int angle) {
  for (int i = 0; i < 20; ++i) {
    myservo.write(90 - angle);
    delay(300);
    myservo.write(90 + angle);
    delay(300);
  }
}

void start_servo(unsigned long current_millis) {
  myservo.write(SERVO_BASE_ANGLE);
  current_angle = 0;
  current_max_angle = min(SERVO_MAX_ANGLE, get_max_angle());
  current_velocity_positive = true;
  previous_servo_move = current_millis;
}

int translate_ir() {
