   return false;
 }
 
+
+// COMMUNICATION
+
+// turn on light / open solenoid for selector connection #n
+void showCorrect(int n)
+{
+  // turn on light
+  digitalWrite(output_lights[n], HIGH);
+  
+  // TODO(bhomberg): open solenoid??
+}
+
+// turn on light for gear #n lodged, or not
+void showLodged(int n, boolean isLodged)
+{
+  digitalWrite(gear_lodged[n], isLodged ? HIGH : LOW);
+}
+
+// Reset all the lights.  (Caller should reset internal state.)
+void resetLights()
+{
+  // turn off all lights
+  for(int i=0; i<7; i++)
+  {
+    digitalWrite(output_lights[i], LOW);
+  }
+  for(int i=0; i<3; i++) 
+  {
+    digitalWrite(gear_lodged[i], LOW);
+  }
+
+  // TODO(bhomberg): close all solenoids (??)
+}
+
 void sendCastleSuccessMessage() 
 {
   // 20's -- 2nd puzzle message

// Check if we have a connection.  rotation is the amount we have rotated,
// relative to 0 being the start position.  (That is, the position of the
// selector gear.)  Call only if all gears are lodged.
boolean haveConnection(int rotation, int gear_types[],
                       int gear_orientations[])
{
  // TODO(benkraft): Make sure these match the actual directions of rotation in
  // the final mechanism.

// PIN NUMBERS
int output_lights[7] = {38, 39, 40, 41, 42, 43, 44};

// TODO(benkraft): Do we still need these?
int gear_lodged[3] = {45, 46, 47};

int pot = A0;
