Flushed to Learn uses a Raspberry Pi 3 as its main processing unit, with an Arduino Uno providing light control. The sound is played through a Bluetooh speaker that is paired to the Raspberry Pi.
All of these components are housed in a relatively small box, and the flushing sounds and effects are triggered by a push button wired directly to a pin on the Raspberry Pi
The project uses a combination of different services to provide song selection to users through a website and play sounds on the Raspberry Pi.
When a user pastes a video url into the URL box on the website, a Django application using the youtube-dl library is used to fetch and download an MP3 file from youtube. This file is uploaded to the AWS cloud which the Raspberry Pi is able to view. When the button on the toilet is pressed down as the handle is flushed, the Raspberry Pi downloads the new audio file from AWS and stores it locally. It then signals through a serial connection to the Arduino, which is used with a shield to drive the 5050SMD led strip. Once a set amount of time is up, the song is stopped automatically with the lights, and the system is ready to run again.