thanks for writing this book, I enjoy reading it much.
Thank you! I am happy to hear that!
Now, I have a problem with the binary dice game. Dice is working fine with a single button. I’ve added the ‘guess-button’
and it serves as a 2nd ‘roll-button’. Can anyone explain ? Here is a picture of it: http://foto.arcor-online.net/palb/alben/29/1907…
As far as I can see you did not connect the second button to digital pin 5. On the book’s cover and at http://www.flickr.com/photos/50804036@N06/5115096995/in/set-72157625241249772/ you can see how the final circuit should look like. I highly recommend putting the buttons in the middle of the breadboard as shown on the photos, because it gives you a little more space for wiring them.
I can’t tell what pins get closed when I hit the button, there’s nothing printed on them. And I’m new to breadboards too.
Don’t worry! I ran into exact the same problems when I started to work with breadboards and buttons. Regarding the closing pins you might consider reading the following forum entry: http://forums.pragprog.com/forums/129/topics/4615.
It would be nice to have real schematics though ;)
I’ve thought about it but then I decided to focus on the photos, because usually for beginners it’s easier to interpet them.
And a note: I’m running Arduino 0018 on Debian.
randomSeed(analogRead(A0)); is throwing an error
randomSeed(analogRead(0)); is not throwing an error, but does it ‘seed it’ ?
Beginning with version 19 the Arduino IDE offers constants named A0, … A5 for the analog pins. This explains, why your IDE does not know A0 and using 0 instead is the right solution. Unless you need special libraries that only work with a particular version of the IDE I recommend upgrading to the latest version.
Hope this helps!