Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4792

Beginners • Re: Raspberry Pi with Door sensors

$
0
0
It’s for real life for the wait time between paying and entering a car wash. So one car is one unit that’s being measured, doesn’t matter how many people are in the car.

The magnetic switch on each entrance gate will be the input to start a timer in our code, when opened. If another car enters (gate opens) before the first car exits, then there will be two timers running, both starting at the time of the respective gate open.

At the exit, there will be a motion sensor (since no gate). When the sensor detects a car, the first timer that started, will come to an end. This will continue throughout the day. If the gate doesn’t open, a timer doesn’t start.

The purpose of the RPI is to connect these input signals to my code to: start a timer, end a timer, calculate time elapsed per car, and flag any times that were longer than 45 seconds.

All of the above is independent of the gates actually opening and closing, as this functionality is already built and operational. Think of these sensors and RPIs as something I’m adding to our current systems in the cheapest way possible.

Statistics: Posted by TonyRD — Thu Jan 18, 2024 10:40 pm



Viewing all articles
Browse latest Browse all 4792

Trending Articles