MagPi 15 is out now. As usual it’s so full of Raspberry Pi goodness that I don’t know where to start: build a custom OS; XML; AdvMAME; our good friend James H riffing on camera stuff; real time clock; Arduino; RiscOS and more.
I insist that you download it immediately and soak it up like a nice big mug of beef tea.
Friday, August 2, 2013
|Asus has been busy making 7-inch tablets lately. Not only do they provide the hardware for the 2nd generation Google Nexus 7 that was released last week, they are also releasing a new 7-inch tablet under their own brand name called the ASUS MeMO Pad HD 7. You may recall that Asus released a similar [...]|
When Jeroen Danckers sent us a blog post with that title he was on to a winner. And let’s face it, who hasn’t dreamed of putting a computer in the toilet connected to a camera that reports back to a web page whether the toilet is occupied or not. I have.
The trick with the webcam
In all its simplicity we put a webcam in our toilet. It luckily doesn't shoot any compromising images, but measures the light intensity instead. The cam takes a boring shot of the wall in the front hall and then grants a brightness value to each pixel with PHP-GD.
From those -100 or +100 values we calculate the average, which determines if the toilet is taken or not. Almost dark means no toilet action and a lot of light probably means 'danger zone in action'. Or the cleaning lady is making her rounds.
Technical set-up Toiletcam
The calculation of the state of the toilet happens like this:
In the same time the Raspberry Pi offers a local website that refreshes each 5 seconds through an Ajax-call, pulls the current states of the toilets and shows them in a nice lay-out.
Surprisingly handy innovations on the working floor
Next up on our list of innovations is the realtime level of the coffeepot!