Optical Sensor

Hi, I posted in the Sensor area but it looks like my sensor is working correctly. It's more I just don't know how to wire it up.
Given the following diagram how should I wire this into Arduino? Its a Digital Optical Level Sensor:

The Specs are listed as:
Supply Voltage: 5 to 12 VDC
Supply Current: 15ma

It's part number is: Digital Output OPT4291-1 from this website:
http://madisonco.interdevhosting.com/index.php?option=com_content&view=article&id=1835&Itemid=61&lang=de

Any help would be much appreciated as I swear I have tried everything I can think of.

Thanks!

As mentioned in the other thread:-
Simply green to arduino input, red to arduino +5V, blue to arduino ground.

If that doesn't work then you have either wired it up wrong or there is some error in the sketch you have in the arduino reading the input pin. Try posting what you have (use the # icon to surround your code with the right HTML to put it in a box)

Thanks for the reply Mike,
I will try wiring it up again exactly as you stated. Just to confirm, do I need a resistor between the Arduino +5v and the Red Sensor wire? I haven't tried it yet without as I was worried I might fry the IR LED inside it...

He is the basic code I have been using to test:

const int sensorPin = 2;

void setup() {
   Serial.begin(9600);
   pinMode(sensorPin, INPUT);     
}

void loop(){
  delay(500);
  Serial.println(digitalRead(sensorPin))
}

Thanks
Tyler

Pulled the resistor and everything started to work correctly. Not sure where I got the idea i needed it...
Thanks for the help Mike.