University of California, Berkeley
Since then, the water closet has finally advanced to the
The main objective of this
project is to have fun, and create a smart, interactive, mysterious, and
amusing bathroom going experience. However, it can also be viewed at as
an experiment in home automation, artificial intelligence, and user interfaces.
An inexpensive IBM 486 computer called toilet has been "installed" in the water closet alongside the real toilet. Toilet runs Slackware Linux and contains a sound card with joystick port, an ethernet card, standard parallel and serial ports, and a CD-ROM drive. The case is on the floor with a special cover (this is an especially adverse environment), and a mini keyboard is mounted on the wall.
Most data is acquired through the joystick port of the sound card, which gives 4 analog values (the axes) and 4 digital on/off values (the buttons). A few input bits of the parallel port are also used to read digital on/off values. See the schematic for a complete list of inputs and outputs.
Toilet also makes use of various modules written by others. In order to get news headlines from the web, it has httplib fetch selected web pages and the re module parse the headlines out of them. Once it has these headlines, it scrolls them across the LCD screen using termiosmodule. The sound output system uses the linuxaudiodev and wave modules to play .wav sounds. Toilet also uses a DB-API module to store history into a database and socket to listen for requests from other processes.
When a motion sensor detects a visitor in the hallway outside, toilet picks from a list of sounds to play to encourage a visitor to enter. When Toilet has a visitor, it picks an appropriate track to play from the CD based on things like the seat positions, the laser beam across the seat being broken, the light switch being off, etc. It scrolls news headlines across the LCD panel. When the toilet is flushed, the lights flash and the music fades. If the seat is left up when the door is opened, a reminder sound plays. Toilet also serves web pages to the outside that allow us to view history from the database, request specific CD tracks, control the volume, and send messages to the LCD screen.
Toilet has been in development for nearly two years. We have used Python for about 3 months, during which time the development has gone significantly faster.