Bidirectional Counter using IR sensors and Arduino.

  Рет қаралды 43,940

MYTECTUTOR

MYTECTUTOR

Күн бұрын

Пікірлер: 33
@loopfi8835
@loopfi8835 2 жыл бұрын
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.
@hassaneelmahi3761
@hassaneelmahi3761 Жыл бұрын
#include 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(count0 && count
@jmangelolumactod134
@jmangelolumactod134 9 ай бұрын
Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno" sketch_jan02a:1:10: fatal error: LiquidCrystal_I2C.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. exit status 1 LiquidCrystal_I2C.h: No such file or directory This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. @@hassaneelmahi3761
@sirmike7619
@sirmike7619 7 ай бұрын
not working @@hassaneelmahi3761
@rrbrother8154
@rrbrother8154 Жыл бұрын
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?
@mattbodycote2914
@mattbodycote2914 2 жыл бұрын
are you able to give a shopping list of items for this, its exactly what I'm looking for
@Drxxx
@Drxxx 3 жыл бұрын
Great video!!
@manjunathchindi9803
@manjunathchindi9803 Жыл бұрын
I need circuit diagram for this
@nsnowaz
@nsnowaz 2 жыл бұрын
This is very useful logic
@photonixenlighteningworld5026
@photonixenlighteningworld5026 3 жыл бұрын
It will be better if you explain your code in your video .
@varunbodile3064
@varunbodile3064 Күн бұрын
can any one tell me what type of Ir sensor is that
@ketsireetantiwit6033
@ketsireetantiwit6033 3 жыл бұрын
Very useful, Thanks
@zgryx8428
@zgryx8428 2 жыл бұрын
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
@mohnishsharma5725
@mohnishsharma5725 2 жыл бұрын
even i cant can u help me if u can solve it
@loopfi8835
@loopfi8835 Жыл бұрын
@@mohnishsharma5725 me too
@andalrico4204
@andalrico4204 2 жыл бұрын
Can you make one without using arduino? Is it possible to use 7 segment, ic, ir sensor and other components to make the project?
@its_gayukavi7877
@its_gayukavi7877 2 ай бұрын
Project ke Report h kya
@artawanaget2417
@artawanaget2417 2 жыл бұрын
Please share the code with one door, like in the video 🙏
@kawaii7054
@kawaii7054 2 жыл бұрын
Why is there a buzzer in the code?
@oj_alan6014
@oj_alan6014 3 жыл бұрын
Yuo, The IR sensor is sucks, it not working for this project, Because the distant is low, only 10cm
@jordanwilliams8132
@jordanwilliams8132 Жыл бұрын
Can this code be modified, to count independently by the two sensors and make a sum of count into a seven segment display?
@hassaneelmahi3761
@hassaneelmahi3761 Жыл бұрын
#include 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(count0 && count
@departmentofitinqatartechn8303
@departmentofitinqatartechn8303 Жыл бұрын
Thanks brother
@NahidHasan-mc8vy
@NahidHasan-mc8vy 2 жыл бұрын
Sir programme not running please solve
@sirmike7619
@sirmike7619 7 ай бұрын
can you gave the original code
@karanagrawal8034
@karanagrawal8034 2 жыл бұрын
Please give the code for the sensor when we move left to right and right to left
@mohnishsharma5725
@mohnishsharma5725 2 жыл бұрын
i need that too bro please help
@loopfi8835
@loopfi8835 Жыл бұрын
@@mohnishsharma5725 me too
@mohnishsharma5725
@mohnishsharma5725 Жыл бұрын
@@loopfi8835 i have a different, code I'll send it to u by tomorrow morning
@ztech891
@ztech891 3 жыл бұрын
Please update the code ....
@boopeshkumarprabhakaran
@boopeshkumarprabhakaran 3 жыл бұрын
in my sitution it goes like -1, -2 etc in counts...how to fix the count not go less then 0
@kushalsuryawanshi9557
@kushalsuryawanshi9557 2 жыл бұрын
Can you help me by sharing the code for counting the people by sensor
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
Arduino Visitors Counter | Automatic Light
6:11
Viral Science - The home of Creativity
Рет қаралды 111 М.
Всё пошло не по плану 😮
00:36
Miracle
Рет қаралды 4,3 МЛН
How I Turned a Lolipop Into A New One 🤯🍭
00:19
Wian
Рет қаралды 12 МЛН
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 6 МЛН
Effective Ways To Detect People With Common Sensors
7:43
Core Electronics
Рет қаралды 84 М.
Digital Object Counter Using Arduino || DIY || TexoBot
11:46
Sensors - which one to use
17:06
Electronoobs
Рет қаралды 1,4 МЛН
RFID Locks are way too easy to "Hack"! Let me show you!
11:41
GreatScott!
Рет қаралды 1,3 МЛН
Digital Object Counter using Arduino
9:31
Enjoy Mechatronics
Рет қаралды 22 М.
Monster magnet meets microwave magnetron...
17:44
Brainiac75
Рет қаралды 38 М.
Motion-activated Sound Effects with Arduino, PIR Sensor & MP3 Player
25:26