PaulRB:
// Private : Hardware scan
void Keypad::scanKeys() {
// Re-intialize the row pins. Allows sharing these pins with other hardware.
for (byte r=0; r<sizeKpd.rows; r++) {
pin_mode(rowPins[r],INPUT_PULLUP);
}
// bitMap stores ALL the keys that are being pressed.
for (byte c=0; c<sizeKpd.columns; c++) {
pin_mode(columnPins[c],OUTPUT);
pin_write(columnPins[c], LOW); // Begin column pulse output.
for (byte r=0; r<sizeKpd.rows; r++) {
bitWrite(bitMap[r], c, !pin_read(rowPins[r])); // keypress is active low so invert to high.
}
// Set pin to high impedance input. Effectively ends column pulse.
pin_write(columnPins[c],HIGH);
pin_mode(columnPins[c],INPUT);
}
}
This is the key part of the library code from [here](https://github.com/Chris--A/Keypad/blob/master/src/Keypad.cpp), assuming this is the version you are using. Can you see from the above whether columns or rows are high/grounded? (I can, but I would like you to figure it out. There are only two answers so you have a 50% chance of guessing correctly, but please don't guess, explain why think your answer is correct)
i think there ,,,,, rows have pull-ups and columns are grounded in turn, and diode should allow current to flow from row to column. because i pointed on ,,,,line[pin_mode(rowPins[r],INPUT_PULLUP);] ,,,,,,,
am right ??? and i have a lot of 1N4007 diode ,?? can i use to test????