Welcome! Log In Create A New Profile

Advanced

BV4619 - 20x4 display - Keypad 4x4 - Raspberry

Posted by seb_night 
BV4619 - 20x4 display - Keypad 4x4 - Raspberry
March 03, 2014 09:58AM
Hi,
I use BV4619 for controlled LCD display 20x4 and i have connected 4x4 keypad.
On Raspberry, i use wiringPi library.

Below, i use this code for get the key :
do{

wiringPiI2CWrite( i2c_lcd,'s');
wiringPiI2CWrite( i2c_lcd, 4 );
wiringPiI2CWrite( i2c_lcd, 'r' );
key = wiringPiI2CRead( i2c_lcd);
wiringPiI2CWrite( i2c_lcd,'p');
printf("key:%X\n",key);
delay(250); //250ms

}while(1);

This code return the key, but sometimes i must to press on key several times for i can see the value.
I try to change the debounce value but nothing change.

I don't understand the phenomenon. I hope that you can help me !!

I hope to understand me.
Sorry my bad english.
Re: BV4619 - 20x4 display - Keypad 4x4 - Raspberry
March 03, 2014 03:21PM
Sorry, not familiar with wiringPi library but from the code above, it would be better to get the number of keys in the buffer (command 5) and then get the key if it is greater than 0.
Sorry, only registered users may post in this forum.

Click here to login