This project demonstrates how you can use Arduino to count the number of people that come in and out of a mall using two sensors。
Sensors need to be placed at the entrance and exit points of the park to work as expected. Basically, you increase the number of times everyone comes in, and decrease the number of times they go out.
Before you write the code you have to build the circuit. To do this, connect the LCD pins as follows:
Osoyoo UNO | LCD1602 |
GND | GND |
5V | VCC |
A4 | SDA |
A5 | SCL |
Note:
Overhere, we connect the first PIR sensor to D2 of the UNO board, the other to D3. From sketches of Fritzing, you can look at the connections to be done in a simpler way:
After above operations are completed, connect the Arduino board to your computer using the USB cable. The green power LED (labelled PWR) should go on.Open the Graphical Programming software Mixly and follow the next operations:
Click Save aftogramming is done. Select the board type and serial port to upload the code to the UNO board.
Every visitor comes in(D2 triggers interruption), the number of parks on the display is increased by one. Every time a visitor goes out(D3 triggers interruption), the number of parks on the display is reduced by one..
You must be logged in to post a comment
About the Author