Multiple digitalReads ending in wrong button association

First of all, thanks for the fast replies.

slipstick:
And please post a circuit diagram showing what you have connected to the Arduino and how everything is wired. Buttons switch to ground? With pull up resistors or using internal pullup?

Steve

Thanks for the question because you made me rethink my connections. The problem was, I connected one 10k resistor to GND and then connected all 3 buttons to this resistor. The wires going to the arduino were connected to the same button pin as GND instead of the other side of the button. Using 3 10k resitors and switching the button pin for GND solved the problem.
I searched for some webapplications to draw a circuit diagram but wasn't able to find a good one yet. Do you have any recommendations?

wvmarle:
Also, as a rule of thumb, the moment you start using numbers in your variable names you should have a serious look at [using arraysp/url] instead.
[/quote]

Thanks for the advice! I'm going to change that. :)](https://www.arduino.cc/en/Tutorial/Arrays)