I want working on a project and I'm stuck a little bit. Imagine that you are playing a game. 10 persons have one button each. And they press them after the command. The quickest get 10 points, second one 9 points etc. There are 10 rounds and I need to know who the winner is. So, the question is how can I read input from 10+ digital pins at once? I'm using Arduino Nano + i2c 16 input/output port expander + buttons and resistors (one resistor for each button).
The bad version is
a1=digitalRead(But1) a2=digitalRead(But2) ...
In this case, the first player will always have benefit and the last one - handicap. What should I do?