I found a free (and legal) PDF of an Arduino reference book. It goes over almost everything you'll need to program your project (or at least everything you'll need to get you started) and has some great circuits. I recommend saving it on you computer or printing a copy (35 pages, or about 8 if you do two pages per side, double sided). You can find it here: http://www.lulu.com/items/volume_63/1108000/1108699/4/print/ARDUINO_NOTEBOOKv6.pdf
The code in this book is considered "common knowledge" among programmers, but it is distributed under the Creative Commons "Share Alike" license. This means that if you use the code from this book, you must cite Mr. Evans and use this same or similar license for your code.
I also want to take the minute to let you know about Creative Commons. It is a way to copyright your work (be it code, pictures, writing, ect) for free. If you want to share your genius with other people, but are afraid of someone stealing you idea, this is a great way to secure it. There are varying degrees of CC licensing ranging from anyone can use your IP (intellectual property) in any way they wish to the most restrictive. Check it out.