const int BUZZER=13;//11;
const int GSR=A2;

int threshold=900;

int sensorValue;
int  avg =0;
void setup(){

 long sum=0;
 
 Serial.begin(9600);
 
 pinMode(BUZZER,OUTPUT);
 
 digitalWrite(BUZZER,LOW);
 
 delay(1000);
}
 
void loop(){

for(int i=0;i<500;i++)
 {
   sensorValue=analogRead(GSR);
 
 long sum = 0;
 sum += sensorValue;
 
  avg= sum/500;
 Serial.println(sensorValue);
 delay(5);
 }

  if (avg > threshold){
 
   digitalWrite(BUZZER,LOW);
   Serial.println("Lie detetced");

 }

 }



 
