Content :
Robotic guard ..it allows the human only if they use the sanitizer before entering into any places .It also notes whether the humans uses the sanitizer or not and store those data in the sd card .
Here is the overview of my project ..
https://photos.app.goo.gl/7X6kMmVN1m639fW36
Life after covid :
We all want to stay away from disease for that first thing we have to do is sanitize ourself .... that's why I had made a AI robot that speaks / ask them to use the sanitizer before entering (automatic Sanitizer)
We have different kinds of humans with different behaviour
First.....some will always be in hurry to get rid of these security guard for those ..they can easily access the sanitizer by placing their hand under the sanitizer them it will automatically be served
Watch this video !!
https://photos.app.goo.gl/t2sBEJZgBYagskL7A
https://photos.app.goo.gl/7mRBRLraLppidkwKA
Secondly we know that some they may not aware of this automatic Sanitizer so they can access with the help of AI robot which guides the human ... (It speaks ).
Watch this video !!
https://photos.app.goo.gl/dLL7iuGY93xeyS1g6
Yea...but if we ignore using the sanitizer it will show the alarm message in the screen and then it will also Store that in the sd card
Watch this video !!
https://photos.app.goo.gl/TrUUAcchSbs91bG79
AUTOMATIC SANITIZER :
HERE BY I HAVE DEVELOPED THIS CODE !!!
#include "SD.h"
#define SD_ChipSelectPin 4
#include "TMRpcm.h"
void(* resetFunc) (void) = 0;
#include<Servo.h>
int distance;
Servo ser;
Servo ser1;
int Distance;
long duration;
int trigpin= 9;
int echopin= 5;
TMRpcm song;
float Voltage;
File myfile;
int v=1;
void setup()
{
ser.write(120);
ser1.attach(8);
Serial.begin(9600);
ser.attach(2);
pinMode(trigpin,OUTPUT);
pinMode(echopin,INPUT);
song.speakerPin=10;
ser1.write(150);
delay(1000);
if(!SD.begin(SD_ChipSelectPin))
{
Serial.println("sd fail");
delay(2000);
return;
}
}
void loop() {
Distance=measure();
if (Distance <80){
ser1.write(90);
delay(3000);
Voltage=voltage();
Serial.println(Voltage);
if(Voltage<=2){
servo();
song.setVolume(v);
song.play("t.wav");
delay(9000);
myfile=SD.open("text.txt",FILE_WRITE);
if (myfile){
myfile.println("yea ,sanitizer is used ");
myfile.close();
}
resetFunc();
}
else{
delay(2000);
Distance=measure();
if (distance>80){
song.setVolume(v);
song.play("s.wav");
delay(13000);
Distance=measure();
if (Distance<80){
song.setVolume(v);
song.play("y.wav");
delay(6000);
song.setVolume(v);
song.play("w.wav");
delay(15000);
resetFunc();
}
else if (Distance>80){
song.setVolume(v);
song.play("o.wav");
delay(8000);
Serial.println("alarm: did use the sanitizer ");
delay(1000);
myfile=SD.open("text.txt",FILE_WRITE);
if (myfile){
myfile.println("alarm: did use the sanitizer ");
delay(2000);
myfile.close();
}
resetFunc();
}
}
else if(Distance<80){
song.setVolume(v);
song.play("w.wav");
delay(15000);
resetFunc();
}
}
}
}
int measure(){
digitalWrite(trigpin,LOW);
delayMicroseconds(2);
digitalWrite(trigpin,HIGH);
delayMicroseconds(10);
digitalWrite(trigpin,LOW);
duration=pulseIn(echopin,HIGH);
Serial.println(duration);
distance=duration*0.034/2;
return distance;
}
int voltage(){
int sensorValue =analogRead(A0);
float voltage = sensorValue*(5.0/1023.0);
return voltage;
}
int servo(){
ser.write(0);
delay(2000);
}
Thank you