To Program An Automatic Door Unlock System Using Face Recognition
To Program An Automatic Door Unlock System Using Face Recognition
To Program An Automatic Door Unlock System Using Face Recognition
Aim:
Software Required:
Tinkercad Circuit:
Colab Code:
Tinkercad Code:
#include<string.h>
//Make sure to subscribe :)
String ssid = "Simulator Wifi"; // SSID to connect to
String password = ""; // Our virtual wifi has no password (so dont do your banking stuff on this network)
String host = "api.thingspeak.com"; // Open Weather Map API
const int httpPort = 80;
String uri = "https://api.thingspeak.com/channels/1530449/fields/1.json?
api_key=4WLODSKYM13JZLWP&results=2";
int motor = 10;
int buz = 9;
int setupESP8266(void) {
// Start our ESP8266 Serial Communication
Serial.begin(115200); // Serial connection over USB to computer
Serial.println("AT"); // Serial connection on Tx / Rx port to ESP8266
delay(10); // Wait a little for the ESP to respond
if (!Serial.find("OK")) return 1;
return 0;
}
void anydata(void) {
point = i+1;
break;
}
}
Serial.println(ch[point]);
if(ch[point]=='y')
{
Serial.println("Access Granted");
digitalWrite(motor,HIGH);
delay(6000);
digitalWrite(motor,LOW);
}
else
{
Serial.println("Access denied");
digitalWrite(buz,HIGH);
delay(6000);
digitalWrite(buz,LOW);
}
void setup() {
setupESP8266();
pinMode(motor,OUTPUT);
pinMode(buz,OUTPUT);
}
void loop() {
anydata();
delay(1000);
}
Inference:
From the above code and outputs in
CASE 1:
In Google Colaboratory - I have captured my photo and the program has
recognised my face and welcomed me with “hi Vivek”.
In Tinkercad we see the message “Welcome” in the Serial Monitor.
CASE 2:
In Google Colaboratory- the image captured is that of some stranger and
it
displays “Wait a minute who are you”. Since that image hasn’t been
recorded, the program isn’t able to recognise the new face.
In Tinkercad we see the message “Access Denied” on the Serial Monitor.
Output:
Result: