Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
keypad 8bit Library
01-03-2013, 12:21 PM,
#1
keypad 8bit Library
The current keypad library in Pinguino 8 works aparently fine, but if you press two keys in the same column it repeats one of the keys .

A workaround is to check in the keypad.c if the variable 'state' is already being pressed. If so no more duplicate or more key's will repeat.

keypad.c :

Code:
...
EVALUATE_KEY:
//if (key != NO_KEY && key != currentKey ){

//Correction for simultaneous pressed keys on the same row
if (key != NO_KEY && key != currentKey && state!=PRESSED){     

        
        // if(state ==HOLD && key != currentKey) //try to disable several keys pressed at the same time
        //     return NO_KEY;
        

    
        currentKey = key;
        Keypad_transitionTo(PRESSED);
        
        
        
        return currentKey;
    }

...

I'll soon patch this issue on the svn,
Reply
01-03-2013, 02:29 PM,
#2
RE: keypad 8bit Library
Thanks !

(01-03-2013, 12:21 PM)malagas Wrote: The current keypad library in Pinguino 8 works aparently fine, but if you press two keys in the same column it repeats one of the keys .

A workaround is to check in the keypad.c if the variable 'state' is already being pressed. If so no more duplicate or more key's will repeat.

keypad.c :

Code:
...
EVALUATE_KEY:
//if (key != NO_KEY && key != currentKey ){

//Correction for simultaneous pressed keys on the same row
if (key != NO_KEY && key != currentKey && state!=PRESSED){     

        
        // if(state ==HOLD && key != currentKey) //try to disable several keys pressed at the same time
        //     return NO_KEY;
        

    
        currentKey = key;
        Keypad_transitionTo(PRESSED);
        
        
        
        return currentKey;
    }

...

I'll soon patch this issue on the svn,
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
16-06-2018, 04:55 PM,
#3
RE: keypad 8bit Library
Hello, it would be possible to tell me how I have to declare here:
Code:
//configure row pin modes and states

pinmode(rowPins[r],INPUT);
digitalwrite(rowPins[r],HIGH);


I do not understand how that statement is made
always compiling tells me that I have many parameters


I've put this, but clearly it's not right!

Code:
//configure column pin modes and states

for(c=24;c<29;c++){
pinmode(columnPins[c],OUTPUT);
digitalwrite(columnPins[c],HIGH);
}

because it does not compile correctly.

greetings thank you

Cz.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)