What do you think of this schematic for my Arduino keypad? Are the diodes pointing the right way?
I will make col1
"high" and then check pins row1
, row2
, row3
and row4
and see if current is flowing through. Then make col2
and col3
"high" and again check if current is flowing through the row pins.
Update:
Ok so I´ll change the direction of the diodes. In my code I will declare my rows as inputs and my columns as outputs. Then I will set all columns to "HIGH". To check which keys are pressed I will set col1 to low. There should be current flowing if any key in that column is pressed. I will then check my rows if their state has changed to "LOW". I will repeat the process for col2 and col3. The anti-ghosting diodes should still work. This way it could work right?