Hardware components | ||||||
| × | 1 | ||||
| × | 2 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
Software apps and online services | ||||||
| ||||||
|
Our project will provide flexibility of controlling crowd in highly demanding service areas like Banks, Malls, Grocery stores and a lot of place like this.
When we heard about this challenge, we started thinking about suitable a solution as well as we decided to make it as easier as possible. After thinking some days and analyzing our daily life. We found that, if we make a system that could help us to control crowd in highly demanding service places like Banks, Malls, Grocery stores etc. Then it will be a great solution for those peoples who spend hours of their daily lives to control crowd in these places.
As a result we came with our solution "Rekha 2.0"
Rekha 2.0 is a Arduino based crowd controlling and sanitizing system. We can connect it to the entrance gates of places like Banks, Malls, Grocery stores etc.
Its working with proper explanation and model is shown in the video.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include<Servo.h>
#include<DHT.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#define servopin 8
Servo gate;
#define dhtPin 11
#define dhtType DHT11
DHT dht(dhtPin,dhtType);
#define trigRch1 10
#define trigRch2 9
#define handp 6
#define led 5
float tempe = 0;
float hum = 0;
float speedofSound = 0;
float speedofSoundCm = 0;
int insideCount = 0
float uin()
{
float timein = 0;
pinMode(trigRch1,OUTPUT);
digitalWrite(trigRch1,LOW);
delayMicroseconds(2);
digitalWrite(trigRch1,HIGH);
delayMicroseconds(10);
digitalWrite(trigRch1,LOW);
pinMode(trigRch1,INPUT);
timein = pulseIn(trigRch1,HIGH);
return timein;
}
float uout()
{
float timeout = 0;
pinMode(trigRch2,OUTPUT);
digitalWrite(trigRch2,LOW);
delayMicroseconds(2);
digitalWrite(trigRch2,HIGH);
delayMicroseconds(10);
digitalWrite(trigRch2,LOW);
pinMode(trigRch2,INPUT);
timeout = pulseIn(trigRch2,HIGH);
return timeout;
}
void setup()
{
Serial.begin(115200);
dht.begin();
gate.attach(servopin);
gate.write(70);
pinMode(led,OUTPUT);
pinMode(handp,INPUT);
pinMode(led,OUTPUT);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.print("STARTING........");
display.setCursor(0,10);
display.print("PLEASE WAIT");
display.display();
delay(2000);
}
void loop()
{
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.print("PEOPLES INSIDE");
display.setCursor(0,10);
display.print(insideCount);
display.display();
float enterDist = 0;
float exitDist = 0;
float ldr = 0;
int handDist = 0;
float inTime = 0;
float outTime = 0;
tempe = dht.readTemperature();
hum = dht.readHumidity();
speedofSound = 331.4+(0.606*tempe)+(0.0124*hum);
speedofSoundCm = speedofSound/10000;
inTime = uin();
outTime = uout();
enterDist = (inTime/2)*speedofSoundCm;
exitDist = (outTime/2)*speedofSoundCm;
handDist = digitalRead(handp);
if(enterDist <= 10 && insideCount<5)
{
insideCount = insideCount + 1;
gate.write(180);
Serial.println("GATE OPENED");
Serial.println(insideCount);
delay(2000);
gate.write(70);
Serial.println("PLEASE SANITIZE YOUR HAND");
Serial.println(insideCount);
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.print("WARNING..........");
display.setCursor(0,10);
display.print("PLEASE SANITIZE HAND");
display.display();
while(handDist == 1)
{
handDist = digitalRead(handp);
}
digitalWrite(led,HIGH);
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.print("DONT REMOVE HAND");
display.setCursor(0,10);
display.print("WHILE SANITIZING");
display.display();
delay(2000);
digitalWrite(led,LOW);
Serial.println("SANITIZATION DONE");
Serial.println(insideCount);
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.print("PROCESS COMPLETE");
display.setCursor(0,10);
display.print("THANKS FOR USING");
display.display();
delay(1000);
}
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.print("PEOPLES INSIDE");
display.setCursor(0,10);
display.print(insideCount);
display.display();
if(exitDist <= 10 && insideCount>0)
{
insideCount = insideCount - 1;
gate.write(180);
Serial.println("GATE OPENED");
Serial.println(insideCount);
delay(2000);
gate.write(70);
Serial.println("GATE CLOSED");
Serial.println(insideCount);
}
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0,0);
display.print("PEOPLES INSIDE");
display.setCursor(0,10);
display.print(insideCount);
display.display();
}
import serial
import time
import cv2
font = cv2.FONT_ITALIC
line = cv2.LINE_4
i = 1
arduino = serial.Serial("com9",115200)
time.sleep(1)
while(True):
if i == 1:
while(arduino.inWaiting()==0):
img = cv2.imread("covv.jpg", -1)
img = cv2.resize(img, (1366, 768))
img = cv2.putText(img, "REKHA 2.0 COVID PROTECTION", (200, 100), font, 2, (0, 0, 0), 8, line)
img = cv2.putText(img, "REKHA 2.0 COVID PROTECTION", (200, 100), font, 2, (255, 255, 255), 4, line)
img = cv2.putText(img, "PEOPLE INSIDE : ", (200, 300), font, 2, (0, 0, 0), 8, line)
img = cv2.putText(img, "PEOPLE INSIDE : ", (200, 300), font, 2, (255, 255, 255), 4, line)
img = cv2.putText(img, "STATUS : ", (200, 500), font, 1, (0, 0, 0), 6, line)
img = cv2.putText(img, "STATUS : ", (200, 500), font, 1, (255, 255, 255), 3, line)
cv2.imshow("bab", img)
if cv2.waitKey(1) == ord("q"):
break
pass
i = i+1
data = arduino.readline()
data = str(data,"utf-8")
print(data)
img = cv2.imread("covv.jpg", -1)
img = cv2.resize(img, (1366, 768))
img = cv2.putText(img, "REKHA 2.0 COVID PROTECTION", (200, 100), font, 2, (0, 0, 0), 8, line)
img = cv2.putText(img, "REKHA 2.0 COVID PROTECTION", (200, 100), font, 2, (255, 255, 255), 4, line)
img = cv2.putText(img, "PEOPLE INSIDE : ", (200, 300), font, 2, (0, 0, 0), 8, line)
img = cv2.putText(img, "PEOPLE INSIDE : ", (200, 300), font, 2, (255, 255, 255), 4, line)
img = cv2.putText(img, "STATUS : ", (200, 500), font, 1, (0, 0, 0), 6, line)
img = cv2.putText(img, "STATUS : ", (200, 500), font, 1, (255, 255, 255), 3, line)
img = cv2.putText(img, data, (400, 500), font, 1, (0, 0, 0), 6, line)
img = cv2.putText(img, data, (400, 500), font, 1, (255, 255, 255), 3, line)
cv2.imshow("bab", img)
if cv2.waitKey(1) == ord("q"):
break
pass
while (arduino.inWaiting() == 0):
pass
val = arduino.readline()
val = str(val, "utf-8")
print(data)
img = cv2.imread("covv.jpg", -1)
img = cv2.resize(img, (1366, 768))
img = cv2.putText(img, "REKHA 2.0 COVID PROTECTION", (200, 100), font, 2, (0, 0, 0), 8, line)
img = cv2.putText(img, "REKHA 2.0 COVID PROTECTION", (200, 100), font, 2, (255, 255, 255), 4, line)
img = cv2.putText(img, "PEOPLE INSIDE : ", (200, 300), font, 2, (0, 0, 0), 8, line)
img = cv2.putText(img, "PEOPLE INSIDE : ", (200, 300), font, 2, (255, 255, 255), 4, line)
img = cv2.putText(img, val, (750, 300), font, 2, (0, 0, 0), 8, line)
img = cv2.putText(img, val, (750, 300), font, 2, (255, 255, 255), 4, line)
img = cv2.putText(img, "STATUS : ", (200, 500), font, 1, (0, 0, 0), 6, line)
img = cv2.putText(img, "STATUS : ", (200, 500), font, 1, (255, 255, 255), 3, line)
img = cv2.putText(img, data, (400, 500), font, 1, (0, 0, 0), 6, line)
img = cv2.putText(img, data, (400, 500), font, 1, (255, 255, 255), 3, line)
cv2.imshow("bab", img)
if cv2.waitKey(1) == ord("q"):
break
pass
Comments