#define DEBUG 1
#define PULLUP 1
#define SWITCH_PRESSED (!PULLUP)
#define NUMBER_OF_PINS 10
byte switchPin[NUMBER_OF_PINS]={3,4,5,6,7,8,9,10,11,12};
boolean switchValues[NUMBER_OF_PINS] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
void setup (){
 for (byte i=0; i<NUMBER_OF_PINS; i++){
  pinMode (switchPin[i],INPUT);
  if (PULLUP){
   digitalWrite(switchPin[i],HIGH);
  }
 }
 if (DEBUG) {Serial.begin (9600);}
}
void loop(){
 for (byte i=0; i<NUMBER_OF_PINS; i++){
  if (digitalRead(switchPin[i])==SWITCH_PRESSED){
   switchValues[i]=true;
  }
  else{
   switchValues[i]=false;
  }
 }
}
umm why use almost all of the digital pins? why not use just one analog pins? just get 10 diferent resistors, for each diferent switch and every switch will have it's own number from 0 to 1024!
-why would the voltage change?
-i dont think resistors change the resisntance with heat, just huge diferences like -30C 80C, well thermistors do of course,
-i cant answer that, you could try it with just some buttons like 3 just as a test though...
but i dont think so...
if it does happen, i think with the right software it could be plausible...
simultaneous button presses is a difficult issue. While it is possible that you can get a different voltage, it makes resistor selection harder and software longer. Instead of accounting for n+1 different voltage values (for only one press at a time), you would have to now account for n!+1 different values
This is not the most robust way but it would work. I would just use a shift register if I needed more inputs. A more robust method+less software+ no resistor hunting. This method might be even cheaper than finding 11 different resistors with different values that would work. Plus some shift registers account for simultaneous button presses.
I noticed that nckelectronic's lcd shield uses an analog resistor ladder to distinguish just five buttons, and the shield works on a clean regulated 5V but does not work when I use a marginal 9V battery. It senses the wrong button values because the voltages are very sensitive to a slight underpower situation.
In short, do digital things the digital way. If you have to reduce how many pins you're using, use a parallel-to-serial shift method, don't try to do something "clever" with an analog resistor ladder.
if I want to write an "A"... I push "shift" + "a" so, I would have to use 2 fingers, in this case right little finger for "shift" and left little finger for "a"
would that be a problem to arduino?.... to read 2 inputs pressed at once?
little finger = 12
ring finger = 11
middle finger = 10
index finger = 9
thumb = 8
right hand
little finger = 3
ring finger = 4
middle finger = 5
index finger = 6
thumb = 7
so... for letter "a", only little finger of left hand should press it, this is the 12 pin... if another finger touched letter "a" the program would know there was a mistake because the 12 pin would be LOW and another pin would be as HIGH