 //#define COMPONENT_TEST_MOTOR_COAST
 //#define COMPONENT_TEST_MOTOR_TIME
-#define COMPONENT_TEST_INTERUPT_COST
+#define COMPONENT_TEST_INTERRUPT_COST
+//#define API_TEST_MOTOR_TURN_DEG
 //#define KILLALL // Uncomment this to kill the system, and stop all components
 
 #define MOTOR_1_PIN 12

    
  motor_stop(&motor1);
  
  long average_no_interrupt_time = 0, average_interrupt_time = 0, average_interrupt_count = 0;

  // print result table
  Serial.println("| with       | without    | count      | est cost   |");
  for (int i = 0; i < test_count; i++){
    Serial.print("|    ");
    Serial.print(interrupt_times[i]);
    Serial.print(" |    ");
    Serial.print(no_interrupt_times[i]);
    Serial.print(" |        ");
    Serial.print(interrupt_counts[i]);
    Serial.print(" | ");
    Serial.print((interrupt_times[i] - no_interrupt_times[i]) / (double)interrupt_counts[i], 8);
    Serial.println(" |");

    average_no_interrupt_time += no_interrupt_times[i];
    average_interrupt_time += interrupt_times[i];
    average_interrupt_count += interrupt_counts[i];
  }

  average_no_interrupt_time /= test_count;
  average_interrupt_time /= test_count;
  average_interrupt_count /= test_count; 
  
  Serial.println("-----------------------------------------------------");
  Serial.print("|    ");
  Serial.print(average_interrupt_time);
  Serial.print(" |    ");
  Serial.print(average_no_interrupt_time);
  Serial.print(" |        ");
  Serial.print(average_interrupt_count);
  Serial.print(" | ");
  Serial.print((average_interrupt_time - average_no_interrupt_time) / (double)average_interrupt_count, 8);
  Serial.println(" |");
}
#endif


Motor motor1, motor2, motor3;




void setup() {
#ifdef KILLALL
  exit(0);
