TCRT5000, LED just blinks.... Any thoughts?

www.vishay.com/docs/83760/tcrt5000.pdf (Datasheet)

Analogread from a TCRT5000 sensor - Bajdi electronics (Schematic of how I wired it)

I have an Arduino Uno, I would like to be able you use the TCRT5000 to sense a metal object from about 20mm.After sensing the object, I would like the Adruino to turn on a pneumatic solenoid though external circuuit. I somewhat understand the analog read (0-1023). I'm having trouble understanding how to use the values to achieve my goal. Any help would be greatly appreciated. I'm new to Arduino programing.

Thank you.

The subject is about the TCRT5000 and your question is about the valve ?

Could you try again ? A good question is like this: "How can I drive a 12V 1A solenoid valve with an Arduino Uno".

Perhaps the ABC guide is helpful:
http://www.pighixxx.com/abc-arduino-basic-connections/

Or this tutorial:
http://playground.arduino.cc/Learning/SolenoidTutorial

I'm having trouble understanding how to use the values to achieve my goal

What are the values you are getting?
You realize the TCRT5000 is affected by ambient light levels?

I have a TCRT5000 that Im trying to get to light external LED. The sensor works however doesn't stay on. Just blinks, but it works correctly on pin 13 LED. I programmed pull up resistor. Not sure what the deal is. Can you look at my code and see if I wrote it correctly and if so any thoughts to my issue? Thanks.

int sensePin = A1;
int ledPin = 13;

void setup() {
    analogReference(DEFAULT);       //Analog Reference of 5V is default, I know not needed.

pinMode(ledPin, OUTPUT);            // set ledPin as output
pinMode(sensePin, INPUT);            //set sensePin as input
digitalWrite(15, HIGH);                //set pullup on analog 1

Serial.begin(9600);
}

void loop() {
int val = analogRead (sensePin);

if(val < 1000) digitalWrite(ledPin, HIGH);   // value less then 1000, turn on led
else digitalWrite(ledPin, LOW);                 // value greater then 1000, turn off led

Serial.println(analogRead(sensePin)) ; 
delay(50)

}

Thanks for the advise, I've got a handle on it now.

Hmm - maybe these shouldn't been merged. Sorry about that if I got it incorrect.

never mind, fixed it

What was the fix?

switched LED, stayed on and quit blinking.