[51] back space command in 4x4keypad

Status
Not open for further replies.

kalyaniupen

Junior Member level 2
Joined
Jul 25, 2014
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,468
sir,
i want to know the code in embedded c for backspace,up arrow,down arrow in 4x4 keypad pls help me
 

On Key press you append the key value to an array and terminate it with null character and use this string to display data on LCD. You also use a counter to index array elements.

On Key press (except back space)


Code C - [expand]
1
2
3
keyData[i++] = Key;
keyData[i] = '\0';
displayOnLCD(keyData);



//If backspace is pressed


Code C - [expand]
1
2
3
i--;
keyData[i] = '\0';
diaplayOnLCD(keyData);

 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…