Picture of Alarm Clock with Tetris to Prove You're Awake
This is an Arduino powered alarm clock that after hitting snooze twice the alarm will not cancel until the user has cleared 4 lines in the game Tetris. You physically turn the clock sideways, so the screen is vertical, to play Tetris.  It's never fun to wake up in the morning but playing a little Tetris is at least somewhat enjoyable and quite effective.

Feel free to vote for me in the microcontriller contest if you like my project.  It would appear that contest might be specific to making things move.  So what does this move?  It moves the student who stayed up too late doing homework, it moves the parent with a new born child, it moves the Instructables author who was compelled to finish their project against all common sense.  It moves what can often be the most immoveable of objects... you.

Steps 9 and 10 have additional videos.

Some key features:
-Any button press will silence the alarm for 30 seconds so you’re not listening to the buzzing while playing Tetris.
-User can select how long the snooze interval is (with second granularity), how many times you’re allowed to hit snooze (0-255), and whether the snooze interval is from the time the alarm went off or the time the snooze button (any button) is pressed.
-Two separate alarms: One is a traditional alarm that will go off when that time is reached and then disabled for the following days. The other is what I call a “persistent” alarm that goes off at the same time Monday through Friday so isn’t disabled for the following days.
-It uses large numbers for which I was inspired by this Instructable and he got the idea from here .
-It gets power from a base that it sits on but has a rechargeable battery backup so you can tilt the clock without being encumbered by wires. The switching to and recharging of the NiMH battery happens automatically.
-It has a physical key to silence the alarm which is given to your spouse/roommate/parents so the alarm can be silenced with having to play Tetris
-The backlight brightness is user controllable through software and the backlight is turned off when not on the base to conserve power and indicate that external power is absent.
-You can cancel the alarm at any time, even before the snooze intervals have passed, by playing Tetris.
-Four different styles of Tetris, details Step 8.
-When setting the time and alarms instead of the typical adjusting of hours and minutes the user can adjust tens of hours, hours, tens of minutes, minutes, tens of seconds, seconds, tenths of seconds, hundredths of seconds (yes, really) and day of the week. This allows for quick time setting and ability to synchronize easily with another time source. See Step 9 for details.

Other points of possible interest:
-Use of interrupts, Step 4.
-The best (in my opinion) way to debounce switches, Step 5.
-Use of PROGMEM to store strings to save on memory, Step 7.
-Precise and simple instructions for using the Sparkfun FTDI Basic Breakout board and making a barebones Arduino board, Step 13.
-Keeping time with an Arduino without a separate real time clock, Step 2.
-How to deal with the fact that the Arduino function millis() wraps back to 0 every 50 days or so, Step 2.

This is my very first Arduino project and I have to say it’s a pretty slick environment.
PICme2 years ago
What a great project, I especially like the large digits on the 16x2 display. Not sure about having to clear 4 lines of Tetris though. Thanks for sharing.
waterlubber3 years ago
um..bit outdated?
try arduino 1.0.1
waterlubber3 years ago
Is there a "simple" version, with all the wires, blah blah, with just a 'duino and a tetris fliptop?
kentso3 years ago
I enjoyed reading your code. I thought the button handling code was downright elegant :-) A neat hack. Thanks for posting it. I've used Adafruits DS1307 i2c breakout board in my own projects to good effect.
64bitgenius4 years ago
now to make it so we can play halo XD!!!!!!!!!!!!!
Upir4 years ago
My er... kids... yeah kids, so need one of these...
nickjohnson4 years ago
This reminds me of a math alarm clock I built a few years ago. I still use it, and it still works great: http://www.cheaphack.net/2008/01/turing-alarm-clock.html

I see you're keeping time with a crystal. That will work, but it will be a minute or so fast/slow per day. Try a PLL on mains frequency for better time keeping.
nolte919 (author)  nickjohnson4 years ago
Did you mean a minute or so fast/slow per year? Mine is off by less than a second per day. That's part of the reason I made it easy to synchronize with another time source so I could check that out. In order to synchronize with the mains I'd have to have a way to detect the mains sine wave which would add an additional circuit to the design since I use a standard wall-wort style power supply. Also, since I made the clock removable from the base there would have to be additional connections for that sine wave indicator from the base to the clock. Thanks for the suggestions though.
BearGrills4 years ago
Cool thing man! When I read the name I laughed so much! :D Your idea is as brilliant as it is simple! When I have the opportunity I will try to make one for myself :)
mischka4 years ago
Wow, really cool clock, but I guess I am too tired in the morning to play tetris ;-)