Wrong input if USB powered.

thanks for the answers.

I just reviewed the DIgitalReadSerial tutorial, where i got that stuff from.

"The third wire goes from digital pin 2 to one leg of the pushbutton. That same leg of the button connects through a pull-down resistor (here 10 KOhms) to ground. The other leg of the button connects to the 5 volt supply."

On the image it is not that obvious because the button is set up that the in-/out pins are on both sides of the breadboard and not "in" on the one and "out" on the other side. That's a little bit confusing, I am the proof :wink:

I will upload all the schematic and code so you can build your own one. I think it's a cool little thingie when it works. :wink:

Here is a blog post about my first try. But I disassembled it because of exact that problem. (buttons and stuff are not documented there but I made them) (I could not find the error.)...Now I have a much nicer looking one in a cardboard box. Photos of that one will come later...

http://ben0bi.blogspot.ch/2012/09/arduino-3d-binary-led-clock.html

(It's not even multiplexed on the blog post because i did not have the transistors then.)