Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pinguino32X + keypad librairie
22-01-2013, 04:18 PM,
#14
RE: Pinguino32X + keypad librairie
Bon jour.
Excusez moi pour mon français...

J'ai convert cette librarie pour Pinguino 32 mais il y a une problème.
Si vous appuyer deux clés en le mème colonne, en le terminal voir les deux clés . Quand deux clés son appuyes, il devrait signaler le NON_KEY .

le programme cést en test, avec une colonne et trois lignes. tout les lignes ont pull-ups de 10K Ohms

mon code:


Code:
#include <keypad.h>
#include <keypad.c>


const unsigned char rows = 3;
const unsigned char cols = 1;

KeypadState state;
char currentKey;
unsigned long lastUpdate;
unsigned int debounceTime;
unsigned int holdTime;


char keypadmap[1][3] = {

  {'1','4','7'}
};

// Pino 11: Coluna
// Pinos  
  
//unsigned char *rowp = {3, 2, 1, 0}; //connect to the row pinouts of the keypad
//unsigned char *colp = {7, 6, 5, 4}; //connect to the column pinouts of the keypad
unsigned char rowp[3] = {12, 11,  8}; //connect to the row pinouts of the keypad
unsigned char colp[1] = {13}; //connect to the column pinouts of the keypad

  
void Keypad_transitionTo(KeypadState newState);
void Keypad_initializePins();
void Keypad_init(char *keypadmap, uchar *rowp, uchar *colp, uchar rows, uchar cols);
void Keypad_setDebounceTime(unsigned int debounce);
void Keypad_setHoldTime(unsigned int hold);

void setup ()
{

//Keypad_init(*keypadmap,*rowp,*colp,rows,cols);
Keypad_init(*keypadmap,rowp,colp,rows,cols);
    //Serial.begin(9600);
    Keypad_setDebounceTime(5);
     Keypad_setHoldTime(100);
      
}

void loop ()
{

unsigned char key;

key = Keypad_getKey();

if (key != NO_KEY )
    {
   // Serial.println(key);
   // CDC.write(state + 48);
   // CDC.write(' ');
    CDC.write(key);
    
        CDC.write('\r');
    CDC.write('\n');

    }
    
   //delay(100);  
   // CDC.write('T');
}
Reply


Messages In This Thread
Pinguino32X + keypad librairie - by j3r0m3 - 08-11-2011, 01:10 AM
RE: Pinguino32X + keypad librairie - by j3r0m3 - 08-11-2011, 10:29 PM
RE: Pinguino32X + keypad librairie - by regis - 08-11-2011, 10:51 PM
RE: Pinguino32X + keypad librairie - by j3r0m3 - 09-11-2011, 01:20 AM
RE: Pinguino32X + keypad librairie - by regis - 09-11-2011, 10:00 AM
RE: Pinguino32X + keypad librairie - by j3r0m3 - 10-11-2011, 12:44 PM
RE: Pinguino32X + keypad librairie - by j3r0m3 - 11-11-2011, 11:44 AM
RE: Pinguino32X + keypad librairie - by j3r0m3 - 11-11-2011, 06:19 PM
RE: Pinguino32X + keypad librairie - by j3r0m3 - 12-11-2011, 02:40 PM
RE: Pinguino32X + keypad librairie - by malagas - 22-01-2013, 04:18 PM
RE: Pinguino32X + keypad librairie - by Cristobal - 16-06-2018, 04:44 PM
RE: Pinguino32X + keypad librairie - by Cristobal - 16-06-2018, 05:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)