Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

3. What can be done about it?

Answered: 1 week ago