Bidirectional Counter using IR sensors and Arduino.

preview_player
Показать описание
IR sensor and Arduino used to make a Bidirectional counter

For the code and schematics visit the link below:
Рекомендации по теме
Комментарии
Автор

The code you sent works differently from the show on the video. to count people entering the room requires going through 2 sensors, but the code you posted in the description is working with each sensor, not using both at the same time. Please post the new code.

loopfi
Автор

are you able to give a shopping list of items for this, its exactly what I'm looking for

mattbodycote
Автор

It will be better if you explain your code in your video .

photonixenlighteningworld
Автор

I want to count the exact number of visitors entering and exiting my museum. Where can the parts used to make it be found? How much will the price be? How will it cost in total?

rrbrother
Автор

Can you make one without using arduino? Is it possible to use 7 segment, ic, ir sensor and other components to make the project?

andalrico
Автор

Hello sir, your code for fixing the issue of continously counting when the person stays on the first sensor is NOT WORKING, could you please fix it sir? Thank you so much

zgryx
Автор

Please share the code with one door, like in the video 🙏

artawanaget
Автор

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
#define sensorPin1 13
#define sensorPin2 36


int sensorState1 = 0;
int sensorState2 = 0;
int count=0;
int ready_entrer=0;
int ready_sortir=0;

void setup()
{
pinMode (sensorPin1, INPUT_PULLUP);
pinMode (sensorPin2, INPUT_PULLUP);


lcd.init(); // initialize
lcd.backlight();
lcd.setCursor(4, 0);
lcd.print("COUNTER");
lcd.setCursor(0, 1);
lcd.print("No Visitors ");
delay(200);
}

void loop()
{

sensorState1 = digitalRead(sensorPin1);
sensorState2 = digitalRead(sensorPin2);

if(sensorState1 == LOW){
ready_entrer=1;
}else if(sensorState2 == LOW){
ready_sortir=1;
}
if(ready_entrer==1 && sensorState2 == LOW){
count++;
ready_entrer=0;
ready_sortir=0;
delay(500);
}else if(ready_sortir==1 && sensorState1 == LOW){
count--;
ready_sortir=0;
ready_entrer=0;
delay(500);
}



if(count<=0)
{
lcd.setCursor(0, 1);
lcd.print("No visitors ");
}
else if (count>0 && count<10){
lcd.setCursor(0, 1);
lcd.print("Visitors: ");
lcd.setCursor(12, 1);
lcd.print(count);
lcd.setCursor(13, 1);
lcd.print(" ");

}
else {
lcd.setCursor(0, 1);
lcd.print("Visitors: ");
lcd.setCursor(12, 1);
lcd.print(count);
}
}

hassaneelmahi
Автор

can any one tell me what type of Ir sensor is that

varunbodile
Автор

Sir programme not running please solve

NahidHasan-mcvy
Автор

Can this code be modified, to count independently by the two sensors and make a sum of count into a seven segment display?

jordanwilliams
Автор

Please give the code for the sensor when we move left to right and right to left

karanagrawal
Автор

Yuo,
The IR sensor is sucks, it not working for this project,
Because the distant is low, only 10cm

oj_alan
Автор

in my sitution it goes like -1, -2 etc in counts...how to fix the count not go less then 0

boopeshkumarprabhakaran
join shbcf.ru