Just so OP knows all the options available, you can also apply charlieplexing for the LEDs. Image may be NSFW.
Clik here to view.
https://en.wikipedia.org/wiki/Charlieplexing
The easiest route is to stick to a keyboard matrix, of course. But in the past, there are many cool tricks to conserve GPIO lines. Like using the ADC to read keyboard switches with very few pins... Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Edit: Charlieplexing would be inconvenient because of multiple key presses. Two Picos is still cheap, but needs communications. Two 8-bit I/O expander breakout boards can also work in place of a second Pico. PCF8574 breakout boards that use I2C can be found. Straightforward to use those for lighting any combination of indicator LEDs.
Clik here to view.

https://en.wikipedia.org/wiki/Charlieplexing
The easiest route is to stick to a keyboard matrix, of course. But in the past, there are many cool tricks to conserve GPIO lines. Like using the ADC to read keyboard switches with very few pins... Image may be NSFW.
Clik here to view.

Clik here to view.

Clik here to view.

Edit: Charlieplexing would be inconvenient because of multiple key presses. Two Picos is still cheap, but needs communications. Two 8-bit I/O expander breakout boards can also work in place of a second Pico. PCF8574 breakout boards that use I2C can be found. Straightforward to use those for lighting any combination of indicator LEDs.
Statistics: Posted by katak255 — Thu Aug 22, 2024 12:33 am