I cannot just use simple sensor to detect toilet flush
... or speaker to alarm the user. ...
OK, some ideas to make it really complex:<brainstorm>...</brainstorm>
Warning! Toilet has been flushed! Structural integrity failure in 10 seconds .. 9 .. 8 ..
Simple, I would mount/attach a simple float switch inside the water tank. Trying to use sound recongnition using a arduino is a brain dead idea and a waste of time IMHO. In the real world one searches for simple, elegent, cost effective solutions. I guess in your instructors course, not so?Lefty
A Fast Fourier transform should work pretty accurately,
So you might have one adjustment pot (the sound threshold) and another (the frequency) and with a bit of experimenting get a fairly good result, with a minimum of parts, and a simple program.