 // INPUT READING
 
 // True if white gear is in front of photo resistor.  False if black paper.
+// Undefined if gear not lodged.
 boolean getPhotoresistor(int i) 
 {
   // sees white gear
-  if(analogRead(photoresistors[i]) > 850)
+  if(analogRead(photoresistors[i]) > photoresistor_thresholds[i])
   {
     return true;
   }

  if (state == 3 && buttonPressed())
  {
    state = 0;
  }

  // TODO(benkraft): How do we exit state 3?  When the button is pressed?

  }
  if (debug_state >= 0)
  {
    debug_state = (debug_state + 1) % 20;
  }
  
  int selector_pos = getSelectorGearPosition();
