Wire the buttons to a perma-proto half-sized breaboard like in the project mentioned above (wiring can be seen on the link posted above) and I will use them as INPUT_PULLUP input.
I will add the rotary encoder not to the half-sized breadboard but connect it simply with the arduino.
Now I am not sure how to connect the voltage to the whole setup. The problem is the buttons and the rotary encoder need to separated since the buttons will face upwards and the rotary encoder sidewards, plus there is not much space within the controller.
How can I solve this problem?
And is my solution alright or is another approach better?
But I am not sure how to connect this together, since I need voltage for both components (by both I mean the controller buttons on the half-sized breadboard and the rotary encoder).
You only need a sire for each switch, a wire for each the A and B terminals of the rotary encoder and a wire that connects to ground. No 5V wire needed. One terminal of each switch and the A and B terminals of the rotary encoder connect to a processor pin with its pinMode set to INPUT_PULLUP. The other switch terminals and the rotary encoder common connect to ground.
The ones that you see that have a 5V terminal have pullup resistors on the board. Those are not needed if you use the processor's internal pullup resistors so 5V is not necessary.
They are A, B, switch, encoder common and switch common.
Wire A to an external interrupt, B to an external interrupt or any digital pin, and switch to any digital pin. Wire ground to the 2 common pins.
Optionally put a 0.1uf cap across pin A to ground, pin B to ground and switch to ground to help with noise rejection.
Yes, but I would connect at least one of the rotary encoder pins to an external interrupt and use the Encoder library to read the encoder. See the Encoder library docs to see why the external interrupt.