I'm programming the in- and outputs of a 4x4 matrix keypad for the RPi in order to print the pushed key's value (a letter).
In order to (first) read which row was pushed, the tutorial tells me to convert the row pins to input with a pull up resistance and the column pins to output low. When a key/button is pressed on the pad, a row pin will read a low value.
In order to then read the columns, the "found" row is converted to output high, and the column pins to input with a pull down resistance. When a key/button is pressed on the pad, a column pin will read a high value.
I then asked myself why a pull up was preferred for reading the pushed row, but couldn't make sense out of it. I re-programmed the rows to read for a high value (column pins set to output high) and it worked just as well and made more sense to me (in both reading of row and column: read for a high value).
Why not convert rows to input pull down (instead of pull up) and columns to output high (instead of low)? Wouldn't that make more sense?