Your keyboard drawer greets you!
December 12, 2010 1 Comment
It’s been snowing almost all day today. I made this little fun program to pass some time.
This software will play a tune when you pull out your keyboard tray from your computer desk. It will play another tune when you push the tray back.
It’s perfect for some fun. I used the RTTTL code from Brett Hagman to generate a few tunes included in his original code. Nothing is modified from his code.
You can add a few tunes or sound effects if you prefer.
List of functions:
* Greets you with a tune when you set out to do some work on your computer, by pulling out your keyboard tray.
* Expresses farewell with a tune when you finish work on your computer, by pushing back your keyboard tray.
* TODO – display greeting message on LCD. Should be easy.
* TODO – add some sound effect tunes.
* TODO – add a menu to choose tunes from a list.
You will need to purchase a photo interrupter and breakout board from sparkfun.
http://www.sparkfun.com/products/9299
http://www.sparkfun.com/products/9322
You will also need a Phi-1 shield. A protoshield works too but no soldering is needed if you have an assembled Phi-1 shield.
http://dipmicro.com/store/JL-PHI-1-PCB
Make sure you purchase all the parts listed here:
http://dipmicro.com/store/JL-PHI-1
Solder everything per documentation.
Insert the photo interrupter in the pins 12, 11, 10, with 12 being the signal pin.
Tape a paper blocker to block the interrupter (notice the white paper blocker taped to the bottom of the table top), enjoy!
Here is a video:
Source code:
Pingback: Persistence of vision – 2 principles and how to build « Liudr's Blog