How swatimishra0416-png/automatic-bidirectional-visitor-counter works
This is an Arduino room-occupancy counter: two sequential IR sensors determine entry or exit, the system updates a nonnegative visitor count, and that count drives the LCD and occupancy-based light control. The runtime is implemented in one sketch, so its documented processing stages share that source path. The source was not excerpted; relationships shown here are based on the README’s descriptions of system behavior.
Main entry points: visitor_counter.ino Visitor Count
Components 9
Sensing and Direction
- Sensor Debouncing
code/visitor_counter_code/visitor_counter.ino - Direction FSM
code/visitor_counter_code/visitor_counter.ino
Occupancy State
- Visitor Count
code/visitor_counter_code/visitor_counter.ino
Displays and Controls
- 16×2 LCD
- Light Control
code/visitor_counter_code/visitor_counter.ino - Relay Module
- Status LED
Other components
- IR Sensors A/B
- Room Light
Connections 8
- IR Sensors A/B → Sensor Debouncing: provide readings
README.md - Sensor Debouncing → Direction FSM: provides stable transitions
README.md - Direction FSM → Visitor Count: determines count change
README.md - Visitor Count → 16×2 LCD: updates display
README.md - Visitor Count → Light Control: determines occupancy output
README.md - Light Control → Relay Module: switches
README.md - Relay Module → Room Light: controls
README.md - Light Control → Status LED: indicates output state
README.md