Smit Babariya
Published

Bidirectional Digital Visitor or Person Counter

This module automatically counts the number of people entering or living in a room, home, etc...

IntermediateFull instructions provided1,301
Bidirectional Digital Visitor or Person Counter

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Grove - Infrared Reflective Sensor v1.2
Seeed Grove - Infrared Reflective Sensor v1.2
×2
RGB Backlight LCD - 16x2
Adafruit RGB Backlight LCD - 16x2
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Proteus Simulation File

Code

Arduino IDE code

Arduino
#include<LiquidCrystal.h>
const int rs=12, en=3, d4=4, d5=5, d6=6, d7=7 ;
const int in=8,out=9;
int temp=0;

LiquidCrystal lcd(rs,en,d4,d5,d6,d7);

void setup() {
  
lcd.begin(16,2);
pinMode(in,INPUT);
pinMode(out,INPUT);
lcd.print("Visitor Counter");

}

void loop() {
if(digitalRead(in)==1)
  { 
    temp=temp+1;
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Counting");
    lcd.setCursor(0,1);
     lcd.print(temp);
     delay(500);
  }
else if(digitalRead(out)==1)
{
   temp=temp-1;
   lcd.clear();
    lcd.setCursor(0,0);
     lcd.print("Counting");
   lcd.setCursor(0,1);
   lcd.print(temp);
      delay(500);
}

}

Credits

Smit Babariya

Smit Babariya

2 projects • 6 followers

Comments

Add projectSign up / Login