   // Special case: route fixation button should take a second to activate.
   levers[ROUTE_A_FIXATION].interval(1000);
 
-  // TODO: look up the initial lever positions and update accordingly.
+  // look up the initial lever positions and update accordingly.
+  for (int number = 0; number < ARRAY_SIZE; number++) {
+    levers[number].update();
+
+    if (levers[number].read() == HIGH) {
+      react_to_movement(number, PLUS);
+    }
+    else {
+      react_to_movement(number, MINUS);
+    }
+  }
+
 }
 
 


void update_single_lever_led(int pin, int number) {
  if (position_is_ok[number] == false) {
    if ((millis() % 1000) > 500) {
      digitalWrite(pin, HIGH);
    }
    else {

#include <Bounce2.h>

// Red LEDs named after the signal/switch lever/etc they're for.
// These are the analog ports labeled as a8-a15.
int PIN_LED_SWITCH_5 = A8;
int PIN_LED_SWITCH_1 = A9;
int PIN_LED_SIGNAL_A1 = A10;
int PIN_LED_SIGNAL_A2 = A11;
int PIN_LED_SWITCHING_PERMISSION = A12;
int PIN_LED_ROUTE_A = A13;
int PIN_LED_ROUTE_BERENBACH = A14;
// White LED
int PIN_LED_ROUTE_A_FIXATION = A15;

// Levers and lock
int PIN_LEVER_SWITCH_5 = 22;
int PIN_LEVER_SWITCH_1 = 24;
int PIN_LEVER_SIGNAL_A1 = 26;
int PIN_LEVER_SIGNAL_A2 = 28;
int PIN_LOCK_SWITCHING_PERMISSION = 32;
// Route levers
int PIN_LEVER_ROUTE_A1 = 36;
int PIN_LEVER_ROUTE_A2 = 38;
int PIN_LEVER_ROUTE_BERENBACH1 = 40;
int PIN_LEVER_ROUTE_BERENBACH2 = 42;
// Push button for route fixing
int PIN_BUTTON_ROUTE_A_FIXATION = 46;
// Output pins (pull to 0 means go out of the ground position)
int PIN_OUTPUT_SWITCH_5 = 2;
int PIN_OUTPUT_SWITCH_1 = 3;
int PIN_OUTPUT_SIGNAL_A1 = 4;
int PIN_OUTPUT_SIGNAL_A2 = 5;

// Array index numbers. These are columns in the locking table.
int SWITCH_5 = 0;
