Re: Keypad for Gated Entry

Can I store the AccessCode+TimeStamp in 8 bytes?

Probably, but not using the way you describe if you access code is 6 characters long:

You will need 4 bytes to store the time. The most efficient way is to store the number of seconds since a fixed data. There is arduino code to convert from date and time elements into this 4 byte value in the DateTime Library called makeTime that will do this. (You don't need any of the other functions because you are using a real time clock, the following line will return a long (a 4 byte number) that contains the time
long time = DateTime.makeTime(sec, min, hour, day, month, year);

The method of encoding time as seconds since a date is a standard (sometimes called unix or posix time ) and most programming languages have a function that understands these values.

You can reduce the number of bytes to store the access code from 6 to 4 if the code is numeric. A search for atoi in this forum will turn up discussion where converting from character representation of a number to an int is discussed. Because your numbers are 6 digits you need to use the long integer version, named atol