I assume the buttons are each tied to there own digital pin. If you wanted to open up some more pins to add more functionality to the shield you could tie them all to a single analog pin. Doing something like this. Each button will read a different value on the analog pin. This configuration will also allow you to use different button combination to extend the number of available functions.
Analog pin 5
|
Ground--1K--|--------|--------|-------|-------|
| | | | |
btn1 btn2 btn3 btn4 btn5
| | | | |
100 330 680 1K 2.2K
|--------|--------|-------|-------|-- +5V
I have found that the value received by the Analog pin can vary
buy 2 or 3 points. I've limited to only using 2 button combos since the values get too close together when dealing with 3 and 4 button combos. I'm sure if i change up the resistor values a bit more i can prevent that. With 2 button combination you get unique button combos which should be more then enough for most projects.
BUTTONS: VALUES:
btn 1 929-931 100 Ohm
btn 1 + btn 2 950-951
btn 1 + btn 3 940-942
btn 1 + btn 4 937-939
btn 1 + btn 5 933-934
btn 2 770-771 330 Ohm
btn 2 + btn 3 838-839
btn 2 + btn 4 820-821
btn 2 + btn 5 796-797
btn 3 610-611 680 Ohm
btn 3 + btn 4 730-731
btn 3 + btn 5 674-676
btn 4 512-513 1K
btn 4 + btn 5 607-608
btn 5 318-319 2.2K
This is a little project i recently started on. The goal is to create a nice little library to support these buttons. There is already an AnalogButton library but it puts all the resistors in series from ground and the analog input. So only one button can be IDed at a time.