     "@" is received, all input should be ignored until a "~" is received.
  */
 
+// Set this to true to enable automatic calibration of the laser at startup.
+// Requires that the lasers are powered by the circuit board so they can be turned
+// on and off.
+const boolean autoCalibration = false;
+
+// Default threshold if autocalibration is off.
+const int defaultThreshold = 100;
+
 // These constants won't change.  They're used to give names
 // to the pins used:
 const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to

  pinMode(laserPin, OUTPUT);
  
  setLedMode(LED_ON, 0);
  calibrate();
  setLasers(true);
}


  Serial.println("~");  // Transition back to output data.
}

void setManualThresholds()
{
  for (int i = 0; i < inputCount; ++i) {
    thresholds[i] = defaultThreshold;
  }
}

void setup() {
  // initialize serial communications at 57600 bps:
  Serial.begin(57600); 
