I use a Arduino mirco pro to emulate a keyboard for gaming.
i write a simple code with an if-condition to check if the Pin is High. and also i use a pull down consister, that the Pin is LOW.
and if i push a button, the pin should be HIGH.
But, when ich start the Micro with a USB Cable the arduino answer with 1000' letters, but i dont know why.
i checked the volt after pushing the button and there are 4,7 V. so i think it is okay. and wenn ich dont push the button i have 0V cause of the consister.
I think that John was slightly confused because pinbutton contained the word pin; pinbutton is not the button pin but a variable where the state is stored. For pins, a lot of use use pin (e.g. buttonPin) in the variable name, for the reading of that pin we often use state (e.g. buttonState) in the name.
You should not use magic numbers (like 6 in your case); if you ever decide to move the button to another pin, you have to change it in two locations (or even more). This would be a better version (in my opinion)