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

}

void switch_servo() {
  int step = 10;
  int sign = servo_count ? -1 : 1;

  delay(max(0, 60000 / current_bpm - 300));
  for (int i = -SERVO_MAX_DEGREE; i <= SERVO_MAX_DEGREE; i += step) {
    delay(20);
    myservo.write(90 + sign * i);
  }
  servo_count = !servo_count;
}

    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);
  }
}
