I live in a house with 5 guys and 1 bathroom. In the past, I had to walk all the way upstairs just to find out if the bathroom was occupied. Not anymore! I installed a distance sensor in the bathroom to determine whether or not the door is open or closed (I'm following the assumption that the door is always open if the bathroom is not in use).
Tools:
- Raspberry Pi 3
- HC-SR04 Ultrasonic Sensor
- Flask microframework