Help with Pir Motion Sensor Controlling a Servo

Hey, this is my first post and my first project i'm trying to do by myself with an arduino, so bear with me.

I basically want a motion controlled servo. Real simple, when someone walks past, the servo rotates 90 degrees. (I am setting up a project where when someone walks past a camera it takes a photo of them, the servo will simple push down on the shutter).

I think I can cobble together the code ok, using bits and pieces from other projects.. At this stage i'm looking at what I need to grab. (Any links to bits of code would be useful however! But I have found a few tutes of people doing similar things, the only problem is they don't seem to get into specifics of what gear I need).

Ill be using an Arduino Mega 2560 R3,
a small servo: http://www.mindkits.co.nz/store/movement/servo-small
and a PIR Motion Sensor: http://www.mindkits.co.nz/store/sensors/pir-motion-sensor

Is their anything else I need? I'm guessing I can power the servo and the PIR straight off the arduino? I also read the following about the PIR: "The alarm pin is an open collector meaning you will need a pull up resistor on the alarm pin." Not sure what this means....

Thanks to anyone who can help out!

Cheers

pull up is a resistor connected to v++ to your pin i cant give you a value. sorry

ebay parallax pir motion sensor 5-10usd simply gives 5v HIGH signal when tripped.
i use them for airsoft mines/claymore/bouncing betty to release bb's when someone walks by.
They aclamate to enviro, and no pull up/down resitors required
adjustabe sensitivity/range and runs directly from arduino pin voltage.
vin, gnd, vout/signal

I use a servo motor (not a real servo) and it is manualy reset when i replace bb's etc.
You can easialy add support for a servo just send value to servo instead of analogWrite();
add remote/radio bluseooth gprs trip activation etc easily.

The code is for -reference- use it as a base, but do not just copy. it is detrimental to your learning.
plus u need to customise it

/*
  Digital input, digital output, serial output
 
 Arming Period: ~50 sec
 Reads a digital input pin from motion sensor, displays result
 to digital pin 11 (LED), and updates every 10 sec to allow sensor
 time to "cool down" and display "LOW".
 Also prints the results to the serial monitor.
 
 Running Period: Infinite
 Reads a digital input pin from motion sensor, displays result
 to digital pin 11 (LED), and uses the result to set the value of
 digital pin 13.
 Also prints the results to the serial monitor.
 
 The circuit:
 * motion sensor connected to digital pin 02.
   Center pin of the sensor goes to the digital pin.
   side pins go to +5V and ground
 * LED connected from digital pin 13 to ground "work pin"
 * LED connected from digital pin 11 to ground "sensor pin"
 
 Created 23 Jan. 2012
 By Brad Nelson
  
 */

// These constants won't change.  They're used to give names
// to the pins used:
const int sensorInPin = 2;  // Analog input pin that the potentiometer is attached to
const int servoOutPin = 12; // Analog output pin that the LED is attached to
const int servoLedPin = 13;
const int sensorLedPin = 11;


int sensorValue = HIGH;        // value read from the pot
int outputValue = LOW;        // value output to the PWM (analog out)
long previousMillis = 0;
long interval = 1000;

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600); 
  
  for (int x=0;x<8;x+=1)
    {
        //get sensor value
        sensorValue = digitalRead(sensorInPin);
        // wait for sensor
        delay(5000);
        //print to monitor
        Serial.print(" Attempt = " );
        Serial.print(x);
        Serial.print(" Sensor State = " );                       
        Serial.print(sensorValue);

        // write to board
        if (sensorValue == LOW)
          {
            analogWrite(servoPin, 0);
          }
        else
          {
            analogWrite(servoPin, 1000);
          } 
    }
}



void loop() {
  // read the digital in value:
  sensorValue = digitalRead(sensorInPin);
  
  unsigned long currentMillis = millis();
 
  if(currentMillis - previousMillis > interval) {
    // save the last time you blinked the LED 
    previousMillis = currentMillis;   

    // if the LED is off turn it on and vice-versa:
    if (sensorValue == LOW)
      outputValue = HIGH;
    else
      outputValue = LOW;
    
  if (sensorValue == LOW)  
    {
      analogWrite(servoOutPin, 1000);
      analogWrite(sensorLedPin, 1000);
      analogWrite(servoLedPin, 1000);
      outputValue = LOW;
    }
  if (sensorValue == HIGH)
    {
      analogWrite(sensorLedPin, 0);
      analogWrite(servoOutPin, 0);
      analogWrite(servoLedPin, 0);
      outputValue = HIGH;
    }
        
  // print the results to the serial monitor:
  Serial.print("sensor = " );                       
  Serial.print(sensorValue);      
  Serial.print("\t output = ");      
  Serial.println(outputValue);   

  delay(0001);                     
}

happy to help just let me know

"The alarm pin is an open collector meaning you will need a pull up resistor on the alarm pin." Not sure what this means....

You wll notice the mindkits website page has a link to what means open-collector.
Try a 10K pullup.

You might get away with running "1" small servo off the Arduino 5V buss, but in general this
is not a good idea, as R/C servos are motors which generate a lot of electrical noise and they
draw typically 300-mA or so. However, just one servo might be ok. You could add additional
capacitors on the 5V Buss for filtering, eg 47-uF and 0.1 uF.