<<Are you saying the access code will be alphanumeric?
The keypad http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/194/Default.aspx?txtSearch=key+pad that I'm using has 4 rows and 4 columns. Column 4 has A @
R(row)1, B @ R2, C @ R3, and D @ R4. I figured since the pad has letters why not use it?
<<Will there be one access code or many? Will it be changed, if so how?
I was thinking to use the first digit and the # as the access keys. That will make things easier. I would not have to create access codes. The access codes will just be assigned (verbally) as a combination of 5 digits (ex. 1001A, 1001B?) that begin with 1 and (letter indicating the apartment unit# A-E) the # will function as Enter/Open and/or store key. The program will accept any access code that is 5 characters and begins with 1.
<<When you have the data capture working correctly you can add the EEPROM interface.
I'm trying to understand some code now:
#include <Keypad.h>
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Four columns
// Define the Keymap
char keys[ROWS][COLS] = {
{'1','2','3' 'A'},
{'4','5','6' 'B'},
{'7','8','9' 'C'},
{'#','0','*' 'D'}
};
byte rowPins[ROWS] = { 8, 7, 6, 5}; // Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte colPins[COLS] = { 12, 11, 10, 9 }; // Connect keypad COL0, COL1, COL2 and COL3 to these Arduino pins.
Keypad kpd = Keypad( rowPins, colPins, ROWS, COLS ); // Create the Keypad
#define ledpin 13
void setup()
{
digitalWrite(ledpin, HIGH);
Serial.begin(9600);
}
void loop()
{
char key = kpd.getKey();
if (key != NO_KEY){
Serial.println(key);
}
}
I'm trying to understand what I could use instead of the serial.println (key) to log a key. If EEPROM is written to with analogRead(0) do i have to use shitOut or what...? I dont understand :-?