 // number of degrees to shake servo on each side of center
 const int SHAKE_OFFSET_ANGLE = 25;
 
+// infra red motion detectors
+const int IR_LEFT = 3;
+const int IR_RIGHT = 5;
+
+// diagnostic LED
+const int LED_DIAG = 13;
+
 //
 // GLOBALS
 //

Servo myservo;  // create servo object to control a servo
                // a maximum of eight servo objects can be created

int currAngle = 135;

void setup()
{
  myservo.attach(9);   // attaches the servo on pin 9 to the servo object
  myservo.write(currAngle);

  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);

  Serial.begin(9600);  // open the serial port at 9600 bps:

  delay(3000);         // wait long enough to open Serial console
}

#include <Math.h>
#include <Servo.h>

// multiply by degrees to get radians
//
const double RADIANS_PER_DEGREE = 0.0174532925;

const int LEFT_LIMIT = 80;
const int RIGHT_LIMIT = 140;

// milliseconds to wait between servo movement: when servo is gently oscillating
const int GENTLE_DELAY = 100;

// milliseconds to wait between servo movement: when servo is shaking back & forth
const int SHAKE_DELAY = 10;
