 int output_lights[7] = {38, 39, 40, 41, 42, 43, 44};
 
 int red_button = 30;
+
+int calibration_light = 31;
 
 int pot = A0;
 


  if (state == 2)
  {
    if (selector_pos > last_selector_pos
        || selector_pos < last_selector_pos - 1)
    {

{
  // TODO(benkraft): internal state too?
  // print out position of the pot
  Serial.print("pot: ");
  Serial.println(getSelectorGearPosition());
  // print out the three photoresistors.
  Serial.print("photoresistors:");
  for (int i=0; i<3; i++)
  {
    Serial.print(" ");
    Serial.print(getPhotoresistor(i));
  }
  Serial.println("");
  
  Serial.print("state: ");
  Serial.println(state);
  Serial.print("last selector pos: ");
  Serial.println(last_selector_pos);

  if (state == 1)
  {
    for (int i=0; i<3; i++)
    {
      Serial.print("history ");
      Serial.print(i);
      Serial.print(":");
      for (int j=0; j<=last_selector_pos; j++)
      {
        Serial.print(" ");
        Serial.print(photoresistor_history[i][j]);
      }
      Serial.println("");
    }
  }

  if (state == 2)
  {
    for (int i=0; i<3; i++)
    {
      Serial.print("gear ");
      Serial.print(i);
      Serial.print("type: ");
      Serial.print(gear_types[i]);
      Serial.print(", orientation: ");
      Serial.print(gear_orientations[i]);
      Serial.println("");
    }
  }
  
  Serial.println("");
}

