Hey guys,
and thank you Arrch
Well so far i took matter in my hands and started writing.
I was able to store characters in a buffer and have it return a string when the buffer is full and clearing the buffer. I will now just need to get the butter return when a certain key is pressed.
Suggestions are always welcome.
Thanks again
the code so far
/* @file CustomKeypad.pde
|| @version 1.0
|| @author Alexander Brevig
|| @contact alexanderbrevig@gmail.com
||
|| @description
|| | Demonstrates changing the keypad size and key values.
|| #
*/
#include <Keypad.h>
char buffer[6];
int i;
const byte ROWS = 2; //four rows
const byte COLS = 3; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{'A','B','C'},
{'D','E','F'}
};
byte rowPins[ROWS] = {9,8 }; //connect to the row pinouts of the keypad
byte colPins[COLS] = {7, 6, 5}; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
void setup(){
Serial.begin(9600);
}
void loop(){
while( i < sizeof(buffer))
{
buffer[i] = customKeypad.getKey();
if (buffer[i] == '\0')
break;
i++;
if ( i == sizeof(buffer))
{
Serial.println(buffer);
buffer[i]=0;
Serial.println("-------------");
break;
}
}
}
Image of serial Monitor is attached.
