Pinguino Forum
keypad 8bit Library - Printable Version

+- Pinguino Forum (http://forum.pinguino.cc)
+-- Forum: Software (http://forum.pinguino.cc/forumdisplay.php?fid=7)
+--- Forum: Troubleshooting (http://forum.pinguino.cc/forumdisplay.php?fid=18)
+--- Thread: keypad 8bit Library (/showthread.php?tid=3835)



keypad 8bit Library - malagas - 01-03-2013

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,


RE: keypad 8bit Library - regis - 01-03-2013

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,



RE: keypad 8bit Library - Cristobal - 16-06-2018

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.