Keyboard reading with GPIO


#1

I’ve tried to read the state of the keyboard with just the gpio and if I digital read say pin 13 with something simple like (loop (print (analogread 13))) I can tell when the very top left key is pressed but that’s as far as I got. I tried to read the button next to it but I need to interact with some sort of multiplexer to select the column and I ran into a wall


#2

The 74HC138 is a 3-to-8 line decoder: 74HC138 Datasheet.

From the diagram you need to specify which of the 8 rows of the keyboard you want to read by writing a number to G8 (A0), G9 (A1), and G11 (A2). You can then detect the column by reading G13, G15, G3, G4, G5, G6, and G7.