i have made a 4x4 matrix using Matrix of SPST switches and buttons with Arduino - Electrical Engineering Stack Exchange as a reference. my matrix only detects one keypress at a time. example if i have 3 turned on and i press button 4. 3 turns off and 4 lights up. if i now switch off 4, button 3 which was already in on position turns on.
is this the correct way of working ? i have diodes before each row input of the switch.
i am able to detect indivisual button presses,no ghosting but two buttons cannot be on at the same time only latest pressed one shows up as on.