sparkfun 4x4 keypad matrix

may I suggest that you give the result of the digitalRead action to some variable in the main loop?

quote:

void loop() {
val = digitalRead(dataPin); // read data pin value
if (val == HIGH) { // if HIGH
digitalWrite(ledPin, HIGH); // switch on led pin
digitalRead(in1Pin); // read inputs
digitalRead(in2Pin);
digitalRead(in3Pin);
digitalRead(in4Pin);

/quote

like:
tempVar1 = digitalRead(in1Pin);
tempVar2 = digitalRead(in2Pin);

etc.

so that the read values are somewhere to get.