PIR sensor with LCD Display and LED

The trouble I have now is the LED only turn ON but won’t turn OFF. And my LCD display only display half of the things I want. And I also need to change the 2 PIR sensors to 2 Ultrasonic sensors later but I don’t know how to do the coding.
Anyone can help for this ?:point_up:t2:

This project I am doing uses 2 PIR sensors and also LCD display which will display the number of detection detected and also print ‘Please Visit’ under the number of detection. The left PIR sensor is detect motion going in and on the right one is to detect motion going out. When the left PIR sensor detect motion, the green LED will turn on and LCD display will show 1 which means a motion is detected. The green LED will turn off after that. The number will increase when there are more motion detected. When the right PIR sensor detect motion, the Red LED will turn on and the number of detection will decrease 1 on LCD display. When the number of detection reach 10 then the LCD display will print ‘Please Wait’ and the Red LED will turn on until when the number of detection decrease to below 10 then it will change back to ‘Please Visit’.

Welcome to the community.

We have a page here, how to get the best out of this forum that tells you how to ask a question and what information to include. At the very lease we need to see your code posted correctly and a schematic of your circuit, hand drawn is fine but Fritzing is not.

Counting people in and out is quite hard to do, many have failed, most do not perform very well. This is not a beginners project.

Hello weimeng57
Take some time, study the IPO model and take a piece of paper plus a pencil and design a program structure. Identify modules could to be coded and tested separetly. Merge after sucessfull testing all modules together to the needed project.
It is highly recommented to take a view into some powerful C++ instructions like STRUCT, ENUM, ARRAY, CASE/SWITCH,UDT, RANGE-BASED-FOR-LOOP, etc, too.
Have a nice day and enjoy coding in C++.

Hi, @weimeng57
Welcome to the forum.

Can you please post the code you have at the moment?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, component names and pin labels.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.