Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
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 provided34,423
Bidirectional Digital Visitor or Person Counter

Things used in this project

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
12 projects • 39 followers
Embedded Eng. with demonstrated history of working in diff. Projects like ESP32,8266 & Arduino.Strong engineering professional in E&C eng.
Contact

Comments

Please log in or sign up to comment.