int photocellPin =0 ;    // select the input pin for the photocell
int ledPin = 13;   // select the pin for the LED 
int val = 0;       // variable to store the value coming from the sensor 


void setup() { 
  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT  
  Serial.begin(9600);//To set the baud rate 9600
} 

void loop() { 
  val = analogRead(photocellPin);    // read the value from the sensor  
  Serial.println(val);
  if(val<=120){
    digitalWrite(ledPin, HIGH); 
  }
  else{
    digitalWrite(ledPin, LOW);
  }
}
