Introduction: Shower Timer

Picture of Shower Timer

I had so much fun with the Bath Alert project that I wrote an addon module so it can also be a shower timer!  The laptop senses when you've turned on or off the water and then plays a Youtube of your choice when you've overstayed your intended time in the shower!  This is an addon to the below instructable:
https://www.instructables.com/id/Alert-When-Your-Bath-is-Drawn/


You will need(pretty much all of the materials in the above instructable plus a couple more alligator clips and my second program):

A makey makey
Four 2 foot long alligator clips(should be included with the makey makey kit)
A bath tub
Less than 2 feet of duct tape
A zip lock bag(or you can destroy the anti-static bag in the kit)
A laptop
The Internet
Good Speakers(optional)

Submitted by Montana Ethical Hackers for the Instructables Sponsorship Program!

Step 1: Align the Alligator Clips, Install the Splash Shield, Wire the Makey Makey

Picture of Align the Alligator Clips, Install the Splash Shield, Wire the Makey Makey

It's unethical to repeat my material.  Check out my instructable here.  follow steps 1-3 and then come back here.  

Ready?  Okay!  Let's make this into a shower timer as well!

Step 2: Add Two More Alligator Clips.

Picture of Add Two More Alligator Clips.

Clip an alligator clip to each electrode of the bath project.  Tape the wires down to the far back floor of the shower.  Keep them out of the way so you don't trip.  These wires must have water between them when you're running the shower.  

Download my Shower Timer program from this page.  Unzip it and open it in a browser.  Set the time you want your shower to last.  Keep the window active and in the foreground while you take your shower.

You can reset the timer with the "Reset" button and you can test the timer with the space bar!

Happy showering!  I'm going to take a shower and go to bed.

UPDATE:  I fixed the timer so it's easier for people to use.   It counts down in big minutes and seconds now and it works in all browsers... even in older versions of IE.

Comments

Callyfornia (author)2013-06-12

But an exe/bat would be easy enough to make, then create a shell for Linux/Mac

saintmeh (author)Callyfornia2013-06-13

Don't go with BATs for key presses. This forum will save you a lot of sweat and agony:
http://www.computerhope.com/forum/index.php?topic=77489.0

The best you could hope for is the "Pause" command("Press any key to continue..."). This is a great opportunity to stretch your skills without stretching them thin. Check out VBS for future windows scripting. It will work on *any* windows in the last decade. After that, learn Powershell because that's what they've been successfully switching over to. Microsoft isn't very good about deprecating things before they ax them(as evidenced in my XP tutorial). So make sure you know which way the wind is blowing.

saintmeh (author)Callyfornia2013-06-13

It would be very easy to make a bat file... but you would need PowerShell and it will only run on greater than XP... Or you would have to have your users download an extra program that would turn key presses into return codes and then parse the code back into a key. It's very messy. I've done it before and it was worth it in the 90's. The return codes are an extra step and it can confuse the user. I would suggest using a VBS script instead of BAT and a... well... the bash shell would work on any Linux. I literally wrote that javascript code while sitting on the edge of the bathtub. I had stayed up extremely late to pull the rest of my hackerspace team through our instructables competition. Instructables will likely give us a CNC router for our efforts. The last instructable I entered for the "candle" thing was uber lame... but maybe they'll overlook it because the rest of the stuff was super cool. I was literally thinking to myself "I'm running on fumes" so I made an instructable about fumes. I said we would be done and we were done, by God. I'm still a little nerve wracked and I can't sleep for more than a few hours cause I get so high-voltage and then It takes a bit to come back down. It took me less than five minutes to write the program. I've gotten all preachy so I should give you my creds: I've taught three years of college courses on programming. I've programmed since I was 13 and hacked with hex editors since I was 10. I have *professionally* programmed in more languages than I have years on this planet. My advice is sound.

Don't use Batch/Bash. Learn Java if you want to make a nice cross-platform interface that works with keys. Java seems stupid at first... but it's actually very nice when you get into it. It's been hard to blow your foot off with java since '05. Java 1.5 really made it solid. That was back when Java was owned by Sun.

I'm going to try going back to bed.

Callyfornia (author)2013-06-12

Haven't used a wakey wakeu before, what exactly does it do?

saintmeh (author)Callyfornia2013-06-13

a "Makey Makey"(don't worry I'm "lesdyxic" too) is just really the "brains" of a keyboard. It's really considerably more awesome when you get down to it though. A makey makey is a VERY simple way to interface to a computer as if you've plugged in a keyboard. It can detect a current through fruit, water, graphite, and other non-wire(but vaguely conductive) things. Check it out here:
http://www.kickstarter.com/projects/joylabs/makey-makey-an-invention-kit-for-everyone

I'm pretty sure that I could have just gutted a keyboard like I did in my other instructable:
https://www.instructables.com/id/Mailbox-That-Actually-Emails-You

However, there was too much room for error along that strategy. "Makey Makey" is a challenging name... but then again I made "Montana Ethical Hackers" so who am I to judge a name :D? Maybe they named it that cause they had a good laugh.

Callyfornia (author)2013-06-12

I normally do it in python for this, should I do my first Instructable on how to do it in python?

saintmeh (author)Callyfornia2013-06-12

I think python/perl would be a good option for an interpreted program. However, I don't want my DIYers to have to download an interpreter to run my program. I also don't like using EXEs as I dislike windows. I would use C++ or C to write a code that would check for the specific USB device vendor and serial USB ID. Unfortunately, this requires the rawHID libs in Linux/python(last I knew back in Jan of 2013) and it requires system calls in Windows. I would use this as an opportunity to write a Program that would actually differentiate the makey makey from any other keyboard. That would be VERY useful!

About This Instructable

1,215views

4favorites

License:

More by saintmeh:Sponsorship Round 1Light a Candle Without Touching the WickShower Timer
Add instructable to: