const int LDRpin=7;
const int Buzzerpin=12;
void setup() {
// put your setup code here, to run once:
pinMode(Buzzerpin,OUTPUT);
pinMode(LDRpin,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int Lightint;
Lightint=digitalRead(LDRpin);
if(Lightint==HIGH)
{
tone(12, 262, 250);
digitalWrite(Buzzerpin,HIGH);
delay(1000);}
else
digitalWrite(Buzzerpin,LOW);
}