owatnext wrote:See, I have no prior experience with GPIO at all.
We can see that
owatnext wrote:How many pins are required by a display and how many for each button?
Totally depends on the display.
If you use an HDMI display, without a touch screen, no GPIO pins are needed.
If you use an SPI display, a minimum of four pins will be used.
If the SPI display has an SPI touch controller, it will use another pin.
If you use an I2C based touch controller, you will need to leave the two I2C GPIO's alone.
You can connect one button per pin the simplest connection, or in a 4x5 matrix that would only need 9 gpio's to handle 20 buttons.
owatnext wrote:
If I designed and ordered a PCB, would that bring down my pin usage at all?
No.
Based on the level of electronics knowledge you demonstrated, it is unlikely that you could successfully design a PCB in any reasonable time frame as it requires a lot of prerequisite knowledge.
Note, you could design one after you spend a year or two learning about electronics, the Pi, and gpio, so I am not discouraging you.
As a matter of fact, I hope you will take the above as constructive criticism, and dive in!
Electronics is a great hobby.
owatnext wrote:
Is there a way to enable use of all 40 pins on the header itself?
Again, demonstrating you don't understand the Pi and GPIO header.
There are 26 usable GPIO's as joan said, the rest are power, ground and reserved pins.
What you should consider doing is adding an MCP23017 (I2C GPIO expander) which would handle 16 of the keys trivially, or as many as 64 keys if they are wired as an 8x8 key matrix.
I have an article on my site showing how to do a 4x4 keypad that would be trivial to expand to a 4x5 matrix that would allow for 20 push buttons.
http://www.mikronauts.com/raspberry-pi/ ... nd-python/
owatnext wrote:
Sorry for all of the questions, I just want to know as much as I possibly can.

Thank you.