
#include <Servo.h>
String dicid;
int sled1=13;
int face=0;
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(sled1,1);
}
void loop() {
  // put your main code here, to run repeatedly:
while (Serial.available()==0);
dicid=Serial.readStringUntil('\n');

if (dicid== "asdfg"){
 Serial.println("phone authentiationpass");
 check();
 
}else {
  digitalWrite(sled1,0);
  Serial.println("Wrong");
  }


}
void check(){
  Serial.println(analogRead(A0));
  int face=analogRead(A0);
  if (face >= 700){
  
  digitalWrite(sled1,1);
  
  Serial.println("unlocked"); 
  }else {
  digitalWrite(sled1,0);
  Serial.println("Wrong");
  }
} 
