I hope to have a lot of fun and learn many things with my Arduino Uno I got a few days ago. Before I start, I'd like to notice that I looked for the solution, there are many tutorials and short explanations about how to handle button bounces on hardware level. Sadly, I did not find anything that could be wrong so I decided to create a new topic (though I know this must be some stupid mistake of mine).
What I wanna do is a circuit with 2 LEDs (and a resistor for each of course) and a button which, pressed, will turn one (shining) LED off and the other - on. To do that I connected a resistor to ATmega's pin, a + leg of LED to that resistor and the - to the ground. The same for the second LED. The button is connected to a pin using a pull-up resistor (I'll show the code later) so I only have to take care of two legs of that button. The other leg goes to the ground.
When I test it without the capacitor - there are bounces but generally it works fine (what I means - it switches between these two LEDs). When I insert the 1uF capacitor in parallel with two legs of the button and press the button, both LEDs turn on. When I let it go, the first one always turns off so the second one is the only shining.
I have no idea what's wrong, I hope someone will help me solving this.