This project informs office bathroom availability with LED light to increase its accessibility. A switch is mounted to a latch hole such that when the locking bolt is engaged, the switch is tripped.
On each office floor there are two bathrooms side by side, and the pair of switches inside the door jambs are wired to a single Arduino fitted with an Ethernet Shield for network connectivity. The Arduino samples the switches many times per second, providing near-instant feedback.
After debouncing the switch input signal over about 50 milliseconds, the Arduino waits for a definitive change in state — from locked to unlocked, or unlocked to locked — before illuminating LED lights on the wall.
After the light corresponding to the now-occupied bathroom is lit, the Arduino also performs an HTTP POST, sending the event details (floor level, which room, and current occupancy state) to an in-house webserver runningand MongoDB. The webserver records the data and makes it visible on a web page for viewers to check the availability digitally, for those who can’t see the wall mounted lights from their seating position.
: Collin Allen
Source : http://command-tab.com/2013/07/23/gottago/