     pinMode(SHUT_LED, OUTPUT);
     pinMode(EXPOSE_OUT, OUTPUT);
     pinMode(EXPOSE_LED, OUTPUT);
+    pinMode(STIM_IN, INPUT);
+    pinMode(STIM_LED, OUTPUT);
     // Initial pin states
     turn_ant(false);
     turn_shutter(false);

    turn_shutter(false);  // tell the shutter to close
    delay(postexposure);  // let the muscle rest
    turn_exposure(false); // reset cam trigger
    //turn_ant(false);      // reset whap
}

// Series of control functions

// Control a run
void run(int predelay, int antdelay, int shutterdelay, int exposuredur, int postexposure)
{
//    delay(predelay);      // just to let things settle
//    turn_ant(true);       // whap the ant
    while(!digitalRead(STIM_IN)){
      delayMicroseconds(2);
    }
    delay(antdelay);      // wait for motor movement
    turn_shutter(true);   // tell the shutter to open
    delay(shutterdelay);  // let the shutter physically respond
    turn_exposure(true);  // tell the camera to take a pic
