I have only six GPIO to control a piezo buzzer and 6 LEDs and read 6 buttons...
Would multiplexing the 6 LEDs/buttons in a 2x3 matrix work like this (i.e. 5 pins for the 6 LEDs and buttons, one dedicated pin for the buzzer):
Driving the LEDs with "regular" multiplexing, i.e. row as output high, column as output low. Scanning the buttons by setting row as output high and column to input with pull-down.
Drawback: pushing the button causes the LED to go off, increasing current - not be a problem with low-current LEDs.
Am I missing something? Could it be improved? Are there any implementations "out there"?