how/where to connect a light sensor 3 pin

the sensor will probably work just like an ordinary potientiometer and that means that u will connect the power to the power connection on arduino and the ground to the ground on the arduino. the white cable u will connect to a analog pin.

then u use this code

int ledPin = 13;
int lightPin = 0;
int val = 0;
int value1 = 575;

void setup() {
pinMode(ledPin, OUTPUT);
beginSerial(9600);
}

void loop() {

val = analogRead(lightPin);

printInteger(val);
printByte(10);
printByte(13);

if(val<value1){

digitalWrite(ledPin, HIGH);
}

else ( digitalWrite(ledPin, LOW));

delay(200);
}

that code will get the value from the lightsensor and send it over serial to the computer (I guess it works the same with usb but since I have only worked with the serial version of arduino Im not sure) and if the value is under the value u state in the integer value1 (default to 575 this may need tweaking to match your sensor) the led at pin 13 will light up

then u can also read the value 0-1024 in a program like terminal which u can find here at the site to.

I hope this will help u.