SHIVENDRA VATSA MISHRA
Published

Arduino Based Lie Detector

Hey everyone today I want to show you how to make an Arduino-controlled lie detector we can see all of theses happen in real time in graph.

IntermediateFull instructions provided1.5 hours5,953
Arduino Based Lie Detector

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
Resistor 2.21k ohm
Resistor 2.21k ohm
×1
LED (generic)
LED (generic)
×1
Wire Cable - By the Foot
OpenBuilds Wire Cable - By the Foot
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Circuit Diagram

Code

arduino_code.ino

C/C++
void setup(){
  Serial.begin(9600);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  digitalWrite(2, HIGH);
  delay(500);
   digitalWrite(3, HIGH);
  delay(1000);
  digitalWrite(4, HIGH);
  delay(1500);
}

void loop()
{
  if (analogRead(A0) > 15){ //15
    digitalWrite(4, HIGH); //red
  }
  else{
    digitalWrite(4, LOW); //red
   }
   
  if (analogRead(A0) > 4) //4
  {
    digitalWrite(2, HIGH); //green
  }
  else{
    digitalWrite(2, LOW); //green
  }
  
  if (analogRead(A0) > 8) //8
  {
    digitalWrite(3, HIGH); //yellow
  }
  else{
    digitalWrite(3, LOW); //yellow
  }
 
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
  delay(20);
}
  

Credits

SHIVENDRA VATSA MISHRA
5 projects • 17 followers
Parsuing B.Tech from SRM Institute Of Science And Technology in Electrical And Electronics Engineering.

Comments