For this project me and Ritika chose to make a lie detector on the Arduino.The first thing we did was try and make the lights work. We coded the lights one at a time.Once all the lights worked we added wires that would be attached to your fingers {index & middle finger} with tape and aluminum foil. Once connected we look at the graph and see if you're lying or not!



int greenLED = 11; int yellowLED = 10; int redLED = 9; void setup() { Serial.begin(9600); pinMode(yellowLED, OUTPUT); pinMode(greenLED, OUTPUT); pinMode(redLED, OUTPUT); digitalWrite(yellowLED, HIGH); delay(500); digitalWrite(greenLED, HIGH); delay(500); digitalWrite(redLED, HIGH); delay(500); } void loop() { if (analogRead(A0) > 60) { digitalWrite(redLED, HIGH); } else { digitalWrite(redLED, LOW); } if (analogRead(A0) > 20) { digitalWrite(yellowLED, HIGH); } else { digitalWrite(yellowLED, LOW); } if (analogRead(A0) > 45) { digitalWrite(greenLED, HIGH); } else { digitalWrite(greenLED, LOW); } Serial.println(analogRead(A0)); delay(20); }