Need help with arduino

Hi!
I am a newbie in Arduino…
By the way, excuse me for a lot of mistakes in my texts))))

So… I try to make a light sensor with a photodiode and arduino.
I am using this circuit http://www.libelium.com/squidbee/upload/3/36/AnalogSensor1.jpg
Code:

int photoDiode = 1;
int event = 0;
int threshold = 2;

void setup() {
pinMode (photoDiode, INPUT);
Serial.begin(9600);
}
void loop() {
 event = analogRead(photoDiode);
if (event>=threshold) {
Serial.println("Triggered");

}
}

It is just begining of idea: i want that arduino sent a message "Flash triggered’ when the splash of light detected. But the problem is that even when I turned off all wires and parts from the inputs on Arduino, it still sends signals about “flash triggered”.
Help me with a problem! ))
Thanks!

But the problem is that even when I turned off all wires and parts from the inputs on Arduino, it still sends signals about "flash triggered".
Help me with a problem! ))

That's not a problem, that's a floating pin.
With nothing connected to it, what do you think the input might be picking up?

There's no need to set the input mode of an analogue input.

I ran the scheme in a completely dark room without light, but the Arduino still wrote that "Flash triggered".

A floating pin doesn't care if the lights are on or off.

Put your circuit back together and print the value you're seeing from the analog read to the serial port. See what you get with ambient light and compare to what you see when you shine something brighter on it. Adjust your threshold accordingly.

Would it help if you enable all internal pull-ups for those useless input pins? Then there is no floating pins.

Cheers,
Kari