http://highlowtech.org/?p=1695 (this is the MIT tutorial that almost everyone refers to about doing that..)
When I followed it I got a compiler error until I found a link where other people had the same problem and solved it by including a couple of *.h files. Here a link to the post explaining the problem and solution:
http://forum.arduino.cc/index.php?topic=201063.0