Question: Key de-bouncing in 4x4 matrix Keypad. I need the output to the 2 7-segment LED. It will show last two number. For example if I

Key de-bouncing in 4x4 matrix Keypad. I need the output to the 2 7-segment LED. It will show last two number. For example if I press 5, it shows 5 on the right. If I keep press 5 again, it will show 5 on the left, 5 on the right. If I press 8, it will show 5 on the left, 8 on the right.

Please add key de-bouncing to my code to make it work.

void read(void) { char left_val = 'n'; char right_val = 'n'; char next_val = readKeyPad();

while(1){ next_val = readKeyPad(); if (right_val == next_val || next_val == 'n'){ printChar(left_val, Left); delay(FRAME_PERIOD); printChar(right_val, Right); delay(FRAME_PERIOD); } else { left_val = right_val; right_val = next_val; } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!