Problem with Code

That doesn't answer my question.
My question is about EEPROM. Do you know what EEPROM even is?

oh damn, alright thanks for pointing out

100% this. I have wasted many hours, even days, chasing "too easy to be true" online projects and tutorials.
One time, I even ate horse paste in a vain attempt to track down a particularly nasty bug.

1 Like

You will have to start working on the individual pieces. The 165 in your RTC results indicates a problem. So write a sketch to only work with the RTC and get proper dates and times. You can search the forum to find if there is a solution for RTC 165, it did come along in the past; from memory it's a hardware issue (faulty RTC, bad wiring, bad power).

The below code is tested on a Mega and will work on an Uno/Nano/Pro Mini under the condition that the wiring is correct.

// format to set time" <Tyyyy-MM-dd HH:mm:ss>
// e.g. <T2024/05/01 11:54:00>

#include <Wire.h>
#include "RTClib.h"  //library file for DS3231 RTC Module
RTC_DS3231 rtc;

const char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

const byte numChars = 32;
char receivedChars[numChars];
boolean newData = false;

void setup()
{
  Serial.begin(115200);

  if (! rtc.begin())
  {
    Serial.println("Couldn't find RTC");
    Serial.flush();
    while (1);
  }

  DateTime now = rtc.now();
  printDT(now);
}

void loop()
{
  static uint8_t prevSeconds = 0;
  DateTime now = rtc.now();
  if (now.second() != prevSeconds)
  {
    prevSeconds = now.second();
    printDT(now);
  }

  recvWithStartEndMarkers();
  if (newData == true)
  {
    newData = false;
    switch (receivedChars[0])
    {
      case 'T':
      case 't':
        setDT();
        break;
    }
  }
}

void printDT(DateTime now)
{
  Serial.print(now.year(), DEC);
  Serial.print('/');
  if (now.month() < 10) Serial.print("0");
  Serial.print(now.month(), DEC);
  Serial.print('/');
  if (now.day() < 10) Serial.print("0");
  Serial.print(now.day(), DEC);
  Serial.print(" (");
  Serial.print(daysOfTheWeek[now.dayOfTheWeek()]);
  Serial.print(") ");
  if (now.hour() < 10) Serial.print("0");
  Serial.print(now.hour(), DEC);
  Serial.print(':');
  if (now.minute() < 10) Serial.print("0");
  Serial.print(now.minute(), DEC);
  Serial.print(':');
  if (now.second() < 10) Serial.print("0");
  Serial.print(now.second(), DEC);
  Serial.println();

  Serial.print(" since midnight 1/1/1970 = ");
  Serial.print(now.unixtime());
  Serial.print("s = ");
  Serial.print(now.unixtime() / 86400L);
  Serial.println("d");
}

//==========================

void recvWithStartEndMarkers() {
  static boolean recvInProgress = false;
  static byte ndx = 0;
  char startMarker = '<';
  char endMarker = '>';
  char rc;

  while (Serial.available() > 0 && newData == false)
  {
    rc = Serial.read();

    if (recvInProgress == true)
    {
      if (rc != endMarker)
      {
        receivedChars[ndx] = rc;
        ndx++;
        if (ndx >= numChars)
        {
          ndx = numChars - 1;
        }
      }
      else
      {
        receivedChars[ndx] = '\0'; // terminate the string
        recvInProgress = false;
        ndx = 0;
        newData = true;
      }
    }
    else if (rc == startMarker)
    {
      recvInProgress = true;
    }
  }
}

void setDT()
{

  Serial.println(F("Setting time"));
  char *strtokIndex;
  strtokIndex = strtok(&receivedChars[1], "/");
  if (strtokIndex == nullptr)
  {
    Serial.println(F("Error retrieving year"));
    return;
  }
  int year = atoi(strtokIndex);
  Serial.println(year);

  strtokIndex = strtok(nullptr, "/");
  if (strtokIndex == nullptr)
  {
    Serial.println(F("Error retrieving month"));
    return;
  }
  int month = atoi(strtokIndex);
  Serial.println(month);

  strtokIndex = strtok(nullptr, " ");
  if (strtokIndex == nullptr)
  {
    Serial.println(F("Error retrieving day"));
    return;
  }
  int day = atoi(strtokIndex);
  Serial.println(day);

  strtokIndex = strtok(nullptr, ":");
  if (strtokIndex == nullptr)
  {
    Serial.println(F("Error retrieving hour"));
    return;
  }
  int hours = atoi(strtokIndex);
  Serial.println(hours);

  strtokIndex = strtok(nullptr, ":");
  if (strtokIndex == nullptr)
  {
    Serial.println(F("Error retrieving minutes"));
    return;
  }
  int minutes = atoi(strtokIndex);
  Serial.println(minutes);

  strtokIndex = strtok(nullptr, ":");
  if (strtokIndex == nullptr)
  {
    Serial.println(F("Error retrieving seconds"));
    return;
  }
  int seconds = atoi(strtokIndex);
  Serial.println(seconds);

  rtc.adjust(DateTime(year, month, day, hours, minutes, seconds));

  Serial.println(F("Setting time done"));
}

It's a mix of an example of the RTClib library and Robin's updated Serial Input Basics tutorial; the latter is only used to set the time using the serial monitor.

1 Like

I'm old and still learning at this. So yes don't give up hope.

Put this sketch somewhere you will be able to find it in a few months or years - you will look back and marvel all over it.

You are going to so love learning about arrays…

a7

1 Like

The code worked on my RTC, I was able to get it running on the right time.

But whenever I try to get it to do this it will show random these numbers. Again, the RTC is working just fine from what I can see and that is why I'm kinda confused on this

No. of students User ID 1  User ID 2  User ID 3  User ID 4  User ID 5  User ID 6  User ID 7  User ID 8  User ID 9  User ID 10  User ID 11  User ID 12  User ID 13  User ID 14  User ID 15  User ID 16  User ID 17  User ID 18  User ID 19  User ID 20  User ID 21  User ID 22  User ID 23  User ID 24  User ID 25  User ID 26  User ID 27  User ID 28  User ID 29  User ID 30  User ID 31  User ID 32  User ID 33  User ID 34  User ID 35  User ID 36  User ID 37  User ID 38  User ID 39  User ID 40  User ID 41  User ID 42  User ID 43  User ID 44  User ID 45  User ID 46  User ID 47  User ID 48  User ID 49 
1 	T->215:165:155 D->165/155/165 	T->232:22:46 D->03/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/57/7425 	T->07:215:165 D->155/00/-23211 	T->07:215:255 D->255/255/-1 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->19:02:03 D->07/232/287 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->165:155:00 D->165/85/2007 	T->03:32:34 D->04/07/2024 	T->07:215:00 D->165/165/-25856 	T->07:215:07 D->215/165/-25856 	T->165:155:00 D->165/85/1957 	T->07:208:00 D->00/00/257 	T->07:232:21 D->56/45/1799 	T->07:215:00 D->165/85/2007 	T->155:00:165 D->85/07/-10331 	T->07:215:155 D->00/165/21767 	T->165:85:07 D->215/11/5175 	T->07:215:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->85:07:215 D->155/00/-23211 	T->14:45:01 D->03/07/-6122 	T->07:215:165 D->155/00/-23211 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/101/12064 	T->215:165:155 D->00/165/21767 	T->232:22:25 D->22/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/165/-25856 	T->04:09:49 D->07/05/2313 	T->85:07:215 D->165/155/-23141 	T->03:07:232 D->22/46/769 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->165:85:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->47:01:03 D->07/232/5689 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/255/-1 
2 	T->85:07:215 D->00/165/-23141 	T->232:165:155 D->00/165/21767 	T->22:21:55 D->01/03/2024 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/57/8449 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23141 	T->52:02:03 D->07/232/293 	T->165:155:00 D->165/165/-25856 	T->07:215:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->00:00:00 D->01/01/2000 	T->08:28:40 D->05/07/2024 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->155:00:165 D->85/07/-10331 	T->07:208:00 D->00/00/257 	T->07:232:155 D->00/165/21767 	T->165:155:00 D->165/85/2007 	T->155:00:165 D->85/07/-10331 	T->215:165:155 D->00/165/21767 	T->25:02:07 D->232/11/6942 	T->155:00:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->07:215:165 D->155/00/-23211 	T->15:09:01 D->03/07/-6122 	T->07:215:165 D->155/00/-23211 	T->165:85:07 D->215/215/-23141 	T->29:163:05 D->168/86/2781 	T->215:165:155 D->00/165/21767 	T->232:22:28 D->42/01/775 	T->165:85:07 D->215/85/2007 	T->165:155:00 D->165/85/2007 	T->10:220:181 D->160/01/-21158 	T->00:165:85 D->07/215/165 	T->03:07:232 D->165/155/165 	T->07:215:22 D->21/55/259 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->29:01:03 D->07/232/5689 	T->165:85:07 D->215/165/-25856 --------------------------- 
3 	T->00:165:155 D->00/165/21767 	T->215:22:49 D->30/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->03:07:232 D->23/30/10497 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23141 	T->43:02:03 D->07/232/800 	T->165:155:00 D->165/165/-25856 	T->165:155:00 D->165/85/2007 	T->07:215:00 D->165/85/2007 	T->00:00:00 D->01/01/2000 	T->09:34:55 D->07/07/2024 	T->165:85:07 D->215/85/2007 	T->165:85:07 D->215/165/-25856 	T->155:00:165 D->85/07/-10331 	T->07:208:165 D->155/00/-23211 	T->215:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->155:00:165 D->85/07/-10241 	T->215:165:155 D->00/165/21767 	T->25:02:07 D->232/22/2593 	T->155:00:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->07:215:165 D->155/00/-23211 	T->17:13:01 D->03/07/-6122 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->02:15:08 D->04/04/16644 	T->215:165:155 D->00/165/21767 	T->232:22:41 D->49/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->08:220:168 D->158/03/-22440 	T->165:155:00 D->165/155/165 	T->85:07:215 D->22/49/7681 	T->07:232:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->33:01:03 D->07/232/5918 	T->165:85:07 D->215/165/-25856 --------------------------- 
4 	T->215:165:155 D->00/165/21767 	T->232:22:50 D->47/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->03:07:232 D->01/30/4866 	T->07:215:165 D->155/00/-23141 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23141 	T->21:04:07 D->07/232/800 	T->165:85:07 D->215/85/2007 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/-23141 	T->00:00:00 D->01/01/2000 	T->09:36:31 D->07/07/2024 	T->165:155:00 D->165/85/2007 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 --------------------------- 	T->215:165:155 D->00/165/21767 	T->01:03:07 D->232/22/3629 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23141 --------------------------- 	T->07:215:165 D->85/07/-10331 	T->22:07:01 D->03/07/-6122 	T->07:215:165 D->155/00/-23141 	T->00:165:85 D->07/215/-23141 	T->04:04:00 D->04/04/1033 	T->215:165:155 D->00/165/21767 	T->232:22:43 D->22/01/775 	T->165:155:00 D->165/85/2007 --------------------------- 	T->09:219:165 D->155/00/-23211 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/50/12033 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->41:01:03 D->07/232/286 	T->165:85:07 D->215/165/-25856 --------------------------- 
5 	T->215:165:155 D->00/165/21767 	T->232:22:57 D->29/01/775 	T->165:155:00 D->165/85/2007 --------------------------- 	T->165:155:00 D->165/85/-23141 	T->85:07:215 D->165/155/165 	T->03:07:232 D->01/31/13314 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/0 	T->34:04:07 D->07/232/2076 	T->00:165:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/165/-25856 	T->00:00:00 D->01/01/2000 	T->21:56:45 D->07/07/2024 	T->00:165:85 D->07/215/-23141 	T->165:85:07 D->215/165/-25856 	T->155:00:165 D->85/07/-10331 	T->07:215:11 D->20/55/6402 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 --------------------------- 	T->215:155:00 D->165/85/2007 	T->01:03:07 D->232/22/3849 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23211 	T->00:165:101 D->47/32/7587 	T->155:00:165 D->85/07/-10331 	T->25:22:01 D->03/07/-6122 	T->00:165:85 D->07/215/-23211 	T->00:165:165 D->155/00/-23141 	T->49:07:05 D->09/09/2780 	T->215:165:155 D->165/155/165 	T->232:22:46 D->03/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/57/7425 	T->07:215:165 D->155/00/-23211 	T->07:215:255 D->255/255/-1 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->19:02:03 D->07/232/287 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 
6 	T->215:165:155 D->00/165/21767 	T->232:22:57 D->33/01/775 	T->165:155:00 D->165/85/2007 --------------------------- 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/155/165 	T->03:07:232 D->01/37/11010 	T->00:165:165 D->155/00/-23141 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->00:01:01 D->07/208/0 	T->40:05:07 D->07/232/2338 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->165:85:07 D->215/165/-25856 	T->00:00:00 D->01/01/2000 	T->155:00:165 D->85/07/-10341 	T->00:165:85 D->07/215/-23141 	T->165:85:07 D->215/165/-25856 	T->155:00:165 D->85/07/-10331 	T->07:232:11 D->27/30/6402 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 --------------------------- 	T->165:155:00 D->165/85/2007 	T->01:03:07 D->232/22/4365 	T->165:155:00 D->165/85/2007 	T->07:215:215 D->165/155/165 	T->05:168:86 D->10/221/527 	T->155:00:165 D->85/07/-10331 	T->28:42:01 D->03/07/-6122 	T->07:215:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->181:160:01 D->173/90/2268 	T->85:07:215 D->00/165/-23141 	T->232:165:155 D->00/165/21767 	T->22:21:55 D->01/03/2024 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/57/8449 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23141 	T->52:02:03 D->07/232/293 	T->165:155:00 D->165/165/-25856 	T->07:215:00 D->165/85/2007 
7 	T->215:165:155 D->00/165/21767 	T->232:23:30 D->41/01/775 	T->165:155:00 D->165/85/2007 --------------------------- 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/155/165 	T->03:07:232 D->03/32/5380 	T->00:165:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->00:01:01 D->07/208/0 	T->55:07:07 D->07/232/2340 	T->07:215:85 D->07/215/-23141 	T->07:215:165 D->155/00/-23211 	T->165:85:07 D->215/165/-23141 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->165:85:07 D->215/255/-1 	T->155:00:165 D->85/07/-10331 	T->07:232:22 D->10/33/259 	T->165:85:07 D->215/165/-23141 	T->165:155:00 D->165/85/2007 --------------------------- 	T->165:155:00 D->165/85/2007 	T->01:03:07 D->232/22/5639 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->08:04:04 D->65/04/1028 	T->155:00:165 D->85/07/-10331 	T->41:49:01 D->03/07/-6122 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-1 	T->168:158:03 D->168/88/2523 	T->00:165:155 D->00/165/21767 	T->215:22:49 D->30/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->03:07:232 D->23/30/10497 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23141 	T->43:02:03 D->07/232/800 	T->165:155:00 D->165/165/-25856 	T->165:155:00 D->165/85/2007 
8 	T->215:165:155 D->00/165/21767 	T->232:01:30 D->19/02/775 	T->165:155:00 D->165/155/165 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/155/165 	T->07:07:232 D->03/32/8708 	T->07:215:85 D->07/215/165 	T->00:165:85 D->07/215/2007 	T->00:165:85 D->165/155/165 	T->00:01:01 D->07/208/0 	T->31:07:07 D->07/232/5432 	T->00:165:85 D->07/215/165 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-25856 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23211 	T->00:165:85 D->07/215/-23141 --------------------------- 	T->155:00:165 D->85/07/-10341 	T->07:232:22 D->14/45/259 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/155/165 --------------------------- 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/22/6422 	T->165:155:00 D->165/155/165 	T->85:07:215 D->165/155/165 	T->00:04:04 D->04/09/12551 	T->155:00:165 D->85/07/-10331 	T->43:22:01 D->03/07/-6122 	T->00:165:85 D->07/215/-23141 --------------------------- 	T->165:155:00 D->165/85/-23141 	T->215:165:155 D->00/165/21767 	T->232:22:50 D->47/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->03:07:232 D->01/30/4866 	T->07:215:165 D->155/00/-23141 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/-23141 	T->21:04:07 D->07/232/800 	T->165:85:07 D->215/85/2007 	T->165:155:00 D->165/85/2007 
9 	T->215:165:155 D->00/165/21767 	T->232:01:31 D->52/02/775 	T->85:07:215 D->165/155/165 	T->00:165:85 D->07/215/165 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->00/00/1 	T->07:07:232 D->08/28/10245 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:165 D->155/00/-23211 	T->00:01:01 D->07/208/0 	T->45:07:07 D->07/232/-25856 	T->85:07:215 D->165/155/165 	T->07:215:165 D->155/00/-23211 	T->165:85:07 D->215/165/-25856 	T->11:20:55 D->25/02/2024 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 --------------------------- 	T->00:165:85 D->07/215/-23141 	T->07:232:22 D->15/09/259 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/85/2007 	T->101:47:32 D->29/163/1448 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/22/7210 	T->85:07:215 D->165/85/2007 	T->165:155:00 D->165/155/165 	T->05:09:09 D->10/220/-19040 	T->155:165:155 D->00/165/21767 	T->46:03:01 D->03/07/-5979 	T->00:165:85 D->07/215/5653 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 	T->232:22:57 D->29/01/775 	T->165:155:00 D->165/85/2007 --------------------------- 	T->165:155:00 D->165/85/-23141 	T->85:07:215 D->165/155/165 	T->03:07:232 D->01/31/13314 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->00:165:85 D->07/215/0 	T->34:04:07 D->07/232/2076 	T->00:165:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 
10 	T->215:165:155 D->00/165/21767 	T->232:01:37 D->43/02/775 	T->165:155:00 D->165/155/165 	T->85:07:215 D->165/155/165 	T->00:165:85 D->07/215/165 	T->01:07:208 D->00/00/1 	T->07:07:232 D->09/34/14087 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->00:01:01 D->07/208/-23141 	T->165:85:07 D->215/155/165 	T->85:07:215 D->165/155/165 	T->07:215:165 D->155/00/-23211 	T->165:85:07 D->215/165/-25856 	T->11:27:30 D->25/02/2024 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 --------------------------- 	T->00:165:85 D->07/215/-23141 	T->07:232:22 D->17/13/259 	T->00:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 	T->86:10:221 D->02/15/2052 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/22/10545 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->01:173:90 D->08/220/-22370 	T->215:00:165 D->165/155/165 	T->155:00:165 D->85/07/-10474 	T->55:01:03 D->07/232/-23141 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 	T->232:22:57 D->33/01/775 	T->165:155:00 D->165/85/2007 --------------------------- 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/155/165 	T->03:07:232 D->01/37/11010 	T->00:165:165 D->155/00/-23141 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->00:01:01 D->07/208/0 	T->40:05:07 D->07/232/2338 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 
11 	T->215:165:155 D->00/165/21767 	T->232:03:32 D->21/04/1799 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->01:07:208 D->00/00/1 	T->07:07:232 D->09/36/7943 	T->85:07:215 D->165/155/165 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->165/155/165 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->07:215:255 D->255/255/-1 	T->165:85:07 D->215/165/-25856 	T->22:10:33 D->01/03/2024 	T->07:215:165 D->165/155/165 	T->00:165:85 D->07/215/-23141 --------------------------- 	T->00:165:85 D->07/215/-23211 	T->07:232:22 D->22/07/259 	T->00:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 	T->04:65:04 D->04/04/4 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/22/11030 	T->85:07:215 D->165/155/165 	T->85:07:215 D->255/255/-1 	T->03:168:88 D->09/219/-23141 	T->155:00:165 D->85/07/-10331 	T->49:30:01 D->03/07/-6122 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 	T->232:23:30 D->41/01/775 	T->165:155:00 D->165/85/2007 --------------------------- 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/155/165 	T->03:07:232 D->03/32/5380 	T->00:165:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->00:01:01 D->07/208/0 	T->55:07:07 D->07/232/2340 	T->07:215:85 D->07/215/-23141 	T->07:215:165 D->155/00/-23211 
12 	T->215:165:155 D->00/165/21767 	T->232:03:32 D->34/04/1799 	T->85:07:215 D->00/165/-23141 	T->85:07:215 D->07/215/-23141 	T->85:165:155 D->00/165/21767 	T->01:07:208 D->00/00/1 	T->07:07:232 D->21/56/11527 	T->85:07:215 D->00/165/21767 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->155/00/-23211 	T->00:165:85 D->07/215/2836 	T->85:07:215 D->165/85/2007 	T->85:07:215 D->165/155/165 --------------------------- 	T->165:85:07 D->215/155/165 	T->22:14:45 D->01/03/2024 	T->85:07:215 D->165/155/165 	T->00:165:155 D->00/165/21767 --------------------------- 	T->07:215:165 D->155/00/-23211 	T->07:232:22 D->25/22/259 	T->00:165:155 D->00/165/21767 	T->215:165:155 D->00/165/-23141 	T->04:04:09 D->49/07/1289 	T->165:85:07 D->215/165/-25691 	T->01:03:07 D->232/22/11779 	T->85:07:215 D->165/155/165 --------------------------- 	T->00:165:85 D->165/155/165 	T->155:00:165 D->85/07/-10331 	T->50:47:01 D->03/07/-6122 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-1 	T->00:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 	T->232:01:30 D->19/02/775 	T->165:155:00 D->165/155/165 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/155/165 	T->07:07:232 D->03/32/8708 	T->07:215:85 D->07/215/165 	T->00:165:85 D->07/215/2007 	T->00:165:85 D->165/155/165 	T->00:01:01 D->07/208/0 	T->31:07:07 D->07/232/5432 	T->00:165:85 D->07/215/165 	T->07:215:165 D->155/00/-23211 
13 	T->215:00:00 D->00/01/263 	T->232:08:28 D->40/05/1799 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->01:07:208 D->00/00/1 	T->07:07:232 D->155/00/-23211 	T->215:165:155 D->00/165/21767 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->55:25:02 D->07/232/2843 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 --------------------------- 	T->85:07:215 D->165/155/165 	T->22:15:09 D->01/03/2024 	T->85:07:215 D->165/155/165 	T->215:165:85 D->07/215/-10331 	T->32:29:163 D->05/168/22026 	T->07:215:165 D->155/00/-23211 	T->07:232:22 D->28/42/259 	T->215:165:85 D->07/215/21767 	T->00:165:155 D->00/165/21767 	T->09:10:220 D->181/160/429 	T->155:00:165 D->85/07/-10496 	T->01:03:07 D->232/165/-25856 	T->85:07:215 D->22/21/14081 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 	T->57:29:01 D->03/07/-6122 	T->00:165:85 D->07/215/-23141 --------------------------- 	T->00:165:85 D->165/155/165 	T->215:165:155 D->00/165/21767 	T->232:01:31 D->52/02/775 	T->85:07:215 D->165/155/165 	T->00:165:85 D->07/215/165 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->00/00/1 	T->07:07:232 D->08/28/10245 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->85:07:165 D->155/00/-23211 	T->00:01:01 D->07/208/0 	T->45:07:07 D->07/232/-25856 	T->85:07:215 D->165/155/165 	T->07:215:165 D->155/00/-23211 
14 	T->208:00:00 D->00/01/263 	T->232:09:34 D->55/07/1799 	T->00:165:85 D->07/215/21767 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->01:07:208 D->165/155/165 	T->07:215:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->30:25:02 D->07/232/5642 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 --------------------------- 	T->85:07:215 D->165/155/165 	T->22:17:13 D->01/03/2024 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 	T->221:02:15 D->08/04/1089 	T->07:215:165 D->155/00/-23211 	T->07:232:22 D->41/49/259 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->90:08:220 D->168/158/936 	T->165:165:155 D->00/165/-25856 	T->165:85:07 D->215/22/12574 	T->03:07:232 D->165/155/165 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 	T->57:33:01 D->03/07/-6121 	T->00:165:85 D->07/215/-23141 --------------------------- 	T->85:07:215 D->165/155/165 	T->215:165:155 D->00/165/21767 	T->232:01:37 D->43/02/775 	T->165:155:00 D->165/155/165 	T->85:07:215 D->165/155/165 	T->00:165:85 D->07/215/165 	T->01:07:208 D->00/00/1 	T->07:07:232 D->09/34/14087 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->00:01:01 D->07/208/-23141 	T->165:85:07 D->215/155/165 	T->85:07:215 D->165/155/165 	T->07:215:165 D->155/00/-23211 
15 	T->208:00:00 D->00/01/263 	T->232:09:36 D->31/07/1799 	T->215:165:155 D->00/165/21767 	T->00:165:85 D->07/215/-23141 	T->165:165:155 D->00/165/21767 	T->85:07:215 D->165/155/165 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 --------------------------- 	T->07:215:165 D->155/00/-23211 	T->33:01:03 D->07/232/5646 	T->165:165:155 D->00/165/21767 	T->85:07:215 D->165/155/165 --------------------------- 	T->85:07:215 D->165/85/2007 	T->22:22:07 D->01/03/2024 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 	T->04:04:04 D->00/04/1028 	T->07:215:165 D->155/00/-23211 	T->07:232:22 D->43/22/259 	T->215:165:155 D->00/165/21767 	T->215:255:255 D->255/255/-1 	T->88:09:219 D->165/155/165 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/22/12847 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 	T->30:41:01 D->03/07/-6143 	T->00:165:85 D->07/215/-23141 --------------------------- 	T->85:07:215 D->165/155/165 	T->215:165:155 D->00/165/21767 	T->232:03:32 D->21/04/1799 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->01:07:208 D->00/00/1 	T->07:07:232 D->09/36/7943 	T->85:07:215 D->165/155/165 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->165/155/165 	T->00:165:85 D->07/215/-23141 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->07:215:255 D->255/255/-1 
16 	T->208:00:00 D->00/01/263 	T->232:21:56 D->45/07/1799 	T->215:00:165 D->85/07/-10331 	T->00:165:85 D->07/215/-23141 	T->215:155:00 D->165/85/2007 	T->85:07:215 D->11/20/14105 	T->215:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 --------------------------- 	T->07:215:155 D->00/165/21767 	T->45:01:03 D->07/232/5647 	T->215:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->101/47/8221 	T->165:155:00 D->165/85/2007 	T->22:25:22 D->01/03/2024 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->165/155/165 	T->09:49:07 D->05/09/2314 	T->07:215:165 D->155/165/-25856 	T->07:232:22 D->46/03/259 	T->215:165:155 D->00/165/21767 --------------------------- 	T->85:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/22/14621 	T->85:07:215 D->165/155/165 	T->85:07:215 D->255/255/-1 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 	T->30:19:02 D->03/07/-6143 	T->00:165:155 D->00/165/21767 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->215:165:155 D->00/165/21767 	T->232:03:32 D->34/04/1799 	T->85:07:215 D->00/165/-23141 	T->85:07:215 D->07/215/-23141 	T->85:165:155 D->00/165/21767 	T->01:07:208 D->00/00/1 	T->07:07:232 D->21/56/11527 	T->85:07:215 D->00/165/21767 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->155/00/-23211 	T->00:165:85 D->07/215/2836 	T->85:07:215 D->165/85/2007 	T->85:07:215 D->165/155/165 --------------------------- 
17 	T->208:00:00 D->00/01/263 	T->232:155:00 D->165/85/2007 	T->155:00:165 D->85/07/-10331 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->02:07:232 D->11/27/7705 	T->00:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 --------------------------- 	T->215:165:155 D->00/165/21767 	T->09:01:03 D->07/232/5649 	T->215:165:155 D->00/165/21767 	T->85:07:215 D->215/165/-25856 	T->163:05:168 D->86/10/-8958 	T->165:155:00 D->165/85/2007 	T->22:28:42 D->01/03/2024 	T->85:07:215 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->220:181:160 D->01/173/23048 	T->165:85:07 D->215/00/-23131 	T->07:232:165 D->155/00/-23211 	T->215:22:21 D->55/01/775 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/22/14625 	T->85:07:215 D->165/155/165 --------------------------- 	T->85:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->31:52:02 D->03/07/-6143 	T->215:165:155 D->00/165/-23141 	T->85:07:215 D->00/165/21767 	T->85:07:215 D->165/155/165 	T->215:00:00 D->00/01/263 	T->232:08:28 D->40/05/1799 	T->00:165:85 D->07/215/-23141 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->01:07:208 D->00/00/1 	T->07:07:232 D->155/00/-23211 	T->215:165:155 D->00/165/21767 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->55:25:02 D->07/232/2843 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 --------------------------- 
18 	T->208:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->00:165:85 D->07/215/-1 	T->165:155:00 D->165/85/2007 	T->02:07:232 D->22/10/8449 	T->00:165:85 D->07/215/-23131 	T->215:165:155 D->00/165/21767 --------------------------- 	T->215:165:155 D->00/165/21767 	T->13:01:03 D->07/232/5654 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 	T->15:08:04 D->04/65/1028 	T->165:155:00 D->165/85/2007 	T->22:41:49 D->01/03/2024 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10241 	T->220:168:158 D->03/168/22537 	T->155:00:165 D->155/00/-23211 	T->07:215:22 D->49/30/259 	T->232:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/23/7721 	T->85:07:215 D->165/155/165 --------------------------- 	T->215:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->37:43:02 D->03/07/-6141 	T->00:165:155 D->00/165/-23141 	T->215:165:155 D->00/165/21767 	T->85:07:215 D->00/165/21767 	T->208:00:00 D->00/01/263 	T->232:09:34 D->55/07/1799 	T->00:165:85 D->07/215/21767 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->01:07:208 D->165/155/165 	T->07:215:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->165:155:00 D->165/85/2007 	T->07:215:165 D->155/00/-23211 	T->30:25:02 D->07/232/5642 	T->165:155:00 D->165/85/2007 	T->85:07:215 D->165/155/165 --------------------------- 
19 	T->215:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->165:155:00 D->165/85/2007 	T->03:07:232 D->22/14/11521 	T->155:00:165 D->85/07/-10331 	T->215:165:155 D->00/165/-25856 --------------------------- 	T->215:165:85 D->07/215/-23141 	T->07:01:03 D->07/232/5657 	T->215:165:155 D->00/165/-25856 	T->165:85:07 D->215/165/-25856 	T->04:00:04 D->04/04/2353 	T->165:155:00 D->165/85/2007 	T->22:43:22 D->01/03/2024 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->219:165:155 D->00/165/21925 	T->07:215:165 D->155/00/-23211 	T->07:232:22 D->50/47/259 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 	T->01:03:07 D->232/01/7699 	T->85:07:215 D->165/155/165 --------------------------- 	T->215:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->32:21:04 D->07/07/-6141 	T->00:165:85 D->07/215/21767 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21925 	T->208:00:00 D->00/01/263 	T->232:09:36 D->31/07/1799 	T->215:165:155 D->00/165/21767 	T->00:165:85 D->07/215/-23141 	T->165:165:155 D->00/165/21767 	T->85:07:215 D->165/155/165 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 --------------------------- 	T->07:215:165 D->155/00/-23211 	T->33:01:03 D->07/232/5646 	T->165:165:155 D->00/165/21767 	T->85:07:215 D->165/155/165 --------------------------- 
20 	T->215:11:20 D->55/25/519 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->155:00:165 D->85/07/-10331 	T->03:07:232 D->22/15/2305 	T->155:00:165 D->85/07/-10331 	T->165:85:07 D->215/165/21767 	T->165:101:47 D->32/29/-23803 	T->00:165:85 D->07/215/-23141 	T->22:01:03 D->07/232/5660 	T->165:85:07 D->215/165/21767 	T->165:165:155 D->00/165/-25856 	T->07:05:09 D->09/10/-9035 	T->165:155:165 D->155/00/-23211 	T->22:46:03 D->01/03/2024 	T->155:00:165 D->85/07/-10474 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 	T->07:232:22 D->57/29/259 	T->215:165:155 D->00/165/21767 	T->215:255:255 D->255/255/-1 	T->215:165:155 D->00/165/21925 	T->165:85:07 D->215/165/-25856 	T->02:03:07 D->232/01/7988 	T->155:00:165 D->85/07/-10331 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10496 	T->32:34:04 D->07/07/-6136 	T->215:00:165 D->165/155/165 	T->215:07:215 D->165/155/165 	T->155:00:165 D->85/07/-23141 	T->208:00:00 D->00/01/263 	T->232:21:56 D->45/07/1799 	T->215:00:165 D->85/07/-10331 	T->00:165:85 D->07/215/-23141 	T->215:155:00 D->165/85/2007 	T->85:07:215 D->11/20/14105 	T->215:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 --------------------------- 	T->07:215:155 D->00/165/21767 	T->45:01:03 D->07/232/5647 	T->215:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->101/47/8221 
21 	T->232:11:27 D->30/25/519 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->155:00:165 D->85/07/-10331 	T->03:07:232 D->22/17/3329 	T->155:00:165 D->85/07/-10331 	T->215:215:165 D->155/00/-23211 	T->168:86:10 D->221/02/3848 	T->00:165:85 D->07/215/-23141 	T->42:01:03 D->07/232/5673 	T->215:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->160:01:173 D->90/08/-9048 	T->07:215:00 D->165/165/-25856 	T->165:155:00 D->165/85/2007 	T->21:55:01 D->03/07/-5979 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 	T->07:232:22 D->57/33/259 	T->215:165:155 D->00/165/21767 --------------------------- 	T->155:00:165 D->85/07/-10331 	T->165:85:07 D->215/165/-25856 	T->02:03:07 D->232/01/9515 	T->155:00:165 D->165/155/165 	T->215:00:165 D->85/07/-10331 	T->215:165:155 D->00/165/21767 	T->00:00:01 D->01/07/-12288 	T->28:40:05 D->07/07/-6135 	T->85:07:215 D->165/155/165 	T->85:07:215 D->165/155/165 	T->00:165:85 D->07/215/-23141 	T->208:00:00 D->00/01/263 	T->232:155:00 D->165/85/2007 	T->155:00:165 D->85/07/-10331 	T->00:165:85 D->07/215/-23141 	T->165:155:00 D->165/85/2007 	T->02:07:232 D->11/27/7705 	T->00:165:85 D->07/215/-23141 	T->215:165:155 D->00/165/21767 --------------------------- 	T->215:165:155 D->00/165/21767 	T->09:01:03 D->07/232/5649 	T->215:165:155 D->00/165/21767 	T->85:07:215 D->215/165/-25856 	T->163:05:168 D->86/10/-8958 
22 	T->232:22:10 D->33/01/775 	T->85:07:215 D->165/165/-25856 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->155:00:165 D->85/07/-10331 	T->03:07:232 D->22/22/1793 	T->155:00:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 	T->04:04:65 D->04/04/1024 	T->00:165:85 D->07/215/-23141 	T->49:01:03 D->07/232/5675 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/255/-1 	T->158:03:168 D->88/09/-9307 	T->165:155:00 D->165/85/2007 	T->22:49:30 D->01/03/2024 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 	T->07:232:23 D->30/41/259 	T->215:165:155 D->00/165/21767 --------------------------- 	T->155:00:165 D->85/07/-10331 	T->165:85:07 D->215/165/-25856 	T->02:03:07 D->232/03/8213 	T->155:00:165 D->165/155/165 	T->155:00:165 D->85/07/-10331 	T->215:00:165 D->85/07/-10331 	T->00:00:01 D->01/07/-12288 	T->34:55:07 D->07/07/-6135 	T->85:07:215 D->85/07/-10331 	T->85:07:215 D->165/155/165 	T->00:165:85 D->07/215/-23131 	T->208:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->00:165:85 D->07/215/-1 	T->165:155:00 D->165/85/2007 	T->02:07:232 D->22/10/8449 	T->00:165:85 D->07/215/-23131 	T->215:165:155 D->00/165/21767 --------------------------- 	T->215:165:155 D->00/165/21767 	T->13:01:03 D->07/232/5654 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 	T->15:08:04 D->04/65/1028 
23 	T->232:22:14 D->45/01/775 	T->165:85:07 D->215/165/-25856 	T->155:00:165 D->155/00/-23211 --------------------------- 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/25/5633 	T->155:00:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23131 	T->04:04:04 D->09/49/1797 	T->00:165:85 D->07/215/-23141 	T->22:01:03 D->07/232/5678 	T->165:85:07 D->215/165/-25856 --------------------------- 	T->155:00:165 D->85/165/-25856 	T->165:155:00 D->165/85/2007 	T->22:50:47 D->01/03/2024 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10241 	T->155:00:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 	T->07:232:01 D->30/19/515 	T->215:165:155 D->00/165/-25856 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->165:85:07 D->215/165/-25856 	T->04:07:07 D->232/03/8226 	T->85:07:215 D->85/07/-10496 	T->155:00:165 D->85/07/-10489 	T->155:00:165 D->85/165/-25856 	T->00:00:01 D->01/07/-12288 	T->36:31:07 D->07/07/-6123 	T->155:00:165 D->85/07/-10496 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10341 	T->215:165:155 D->00/165/21767 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->165:155:00 D->165/85/2007 	T->03:07:232 D->22/14/11521 	T->155:00:165 D->85/07/-10331 	T->215:165:155 D->00/165/-25856 --------------------------- 	T->215:165:85 D->07/215/-23141 	T->07:01:03 D->07/232/5657 	T->215:165:155 D->00/165/-25856 	T->165:85:07 D->215/165/-25856 	T->04:00:04 D->04/04/2353 
24 	T->232:22:15 D->09/01/775 	T->165:85:07 D->215/165/-25856 	T->07:215:165 D->85/07/-10281 	T->47:32:29 D->163/05/-22442 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/28/10753 	T->07:215:165 D->85/07/-10411 	T->155:00:165 D->155/00/-23211 	T->09:09:10 D->220/181/-24575 	T->165:155:00 D->165/85/2007 	T->03:01:03 D->07/232/-23141 	T->165:85:07 D->215/22/5431 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 	T->22:57:29 D->01/03/2024 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->155:00:165 D->85/165/-25856 	T->07:215:165 D->155/00/-23211 	T->07:232:01 D->31/52/515 	T->165:85:07 D->215/165/-25856 	T->155:00:165 D->85/07/-10496 	T->155:00:165 D->85/07/-10331 	T->165:85:07 D->215/00/0 	T->04:07:07 D->232/08/7208 	T->165:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->165/155/165 	T->00:00:01 D->01/07/-12288 	T->56:45:07 D->07/07/-5989 	T->165:85:07 D->215/165/-25856 	T->85:07:215 D->165/155/165 	T->00:165:85 D->07/215/-23141 	T->215:11:20 D->55/25/519 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->155:00:165 D->85/07/-10331 	T->03:07:232 D->22/15/2305 	T->155:00:165 D->85/07/-10331 	T->165:85:07 D->215/165/21767 	T->165:101:47 D->32/29/-23803 	T->00:165:85 D->07/215/-23141 	T->22:01:03 D->07/232/5660 	T->165:85:07 D->215/165/21767 	T->165:165:155 D->00/165/-25856 	T->07:05:09 D->09/10/-9035 
25 	T->232:22:17 D->13/01/775 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 	T->10:221:02 D->15/08/1028 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/41/12545 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->173:90:08 D->220/168/-25085 	T->00:165:165 D->155/00/-23141 	T->00:165:85 D->07/215/5681 	T->01:03:07 D->232/165/-25856 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 	T->22:57:33 D->01/03/2024 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->165:85:07 D->215/165/-25856 	T->07:215:165 D->155/00/-23211 	T->07:232:01 D->37/43/515 	T->165:165:155 D->00/165/-25856 	T->165:85:07 D->215/165/-25856 	T->155:00:165 D->85/07/-10496 	T->01:01:07 D->208/00/0 	T->05:07:07 D->232/09/8759 	T->215:165:155 D->00/165/21767 	T->215:165:155 D->00/165/21767 	T->85:07:215 D->165/155/165 	T->00:00:01 D->01/07/-12123 	T->00:165:85 D->07/215/-25856 	T->165:85:07 D->215/165/-25856 	T->85:07:215 D->165/155/165 	T->00:165:85 D->07/215/-23141 	T->232:11:27 D->30/25/519 	T->85:07:215 D->165/155/165 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->155:00:165 D->85/07/-10331 	T->03:07:232 D->22/17/3329 	T->155:00:165 D->85/07/-10331 	T->215:215:165 D->155/00/-23211 	T->168:86:10 D->221/02/3848 	T->00:165:85 D->07/215/-23141 	T->42:01:03 D->07/232/5673 	T->215:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->160:01:173 D->90/08/-9048 
26 	T->232:22:22 D->07/01/775 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 	T->65:04:04 D->04/00/1028 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/43/5633 	T->07:215:165 D->155/00/-23211 	T->07:215:255 D->255/255/-1 	T->168:88:09 D->219/165/-25856 	T->00:165:85 D->07/215/-23141 	T->30:01:03 D->07/232/5682 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 	T->23:30:41 D->01/03/2024 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->165:85:07 D->215/165/-25856 	T->07:215:165 D->155/00/-23211 	T->07:232:03 D->32/21/1031 	T->165:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->01:01:07 D->208/00/0 	T->07:07:07 D->232/09/9247 	T->215:85:07 D->215/165/-25856 	T->215:165:155 D->00/165/21767 	T->85:07:215 D->165/165/-25856 	T->155:00:165 D->85/07/-10331 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->85:07:215 D->255/255/-1 	T->00:165:85 D->07/215/-23141 	T->232:22:10 D->33/01/775 	T->85:07:215 D->165/165/-25856 	T->155:00:165 D->85/07/-10331 --------------------------- 	T->155:00:165 D->85/07/-10331 	T->03:07:232 D->22/22/1793 	T->155:00:165 D->85/07/-10331 	T->07:215:165 D->155/00/-23211 	T->04:04:65 D->04/04/1024 	T->00:165:85 D->07/215/-23141 	T->49:01:03 D->07/232/5675 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/255/-1 	T->158:03:168 D->88/09/-9307 
27 	T->232:22:25 D->22/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/165/-25856 	T->04:09:49 D->07/05/2313 	T->85:07:215 D->165/155/-23141 	T->03:07:232 D->22/46/769 	T->07:215:165 D->155/00/-23211 --------------------------- 	T->165:85:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->47:01:03 D->07/232/5689 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/255/-1 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 	T->01:30:19 D->02/03/2024 	T->155:00:165 D->155/00/-23211 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 	T->07:215:165 D->155/00/-23211 	T->07:232:03 D->32/34/1031 	T->215:85:07 D->215/00/-23131 	T->165:85:07 D->215/07/-10331 	T->165:85:165 D->155/00/-23211 	T->01:01:07 D->208/00/0 	T->07:07:07 D->232/21/14381 	T->165:85:07 D->215/00/-23211 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->215/155/165 	T->155:00:165 D->85/07/-10485 	T->165:85:07 D->215/165/21767 	T->165:85:07 D->215/165/-25856 --------------------------- 	T->00:165:85 D->07/215/-25856 	T->232:22:14 D->45/01/775 	T->165:85:07 D->215/165/-25856 	T->155:00:165 D->155/00/-23211 --------------------------- 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/25/5633 	T->155:00:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23131 	T->04:04:04 D->09/49/1797 	T->00:165:85 D->07/215/-23141 	T->22:01:03 D->07/232/5678 	T->165:85:07 D->215/165/-25856 --------------------------- 	T->155:00:165 D->85/165/-25856 
28 	T->232:22:28 D->42/01/775 	T->165:85:07 D->215/85/2007 	T->165:155:00 D->165/85/2007 	T->10:220:181 D->160/01/-21158 	T->00:165:85 D->07/215/165 	T->03:07:232 D->165/155/165 	T->07:215:22 D->21/55/259 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->29:01:03 D->07/232/5689 	T->165:85:07 D->215/165/-25856 --------------------------- 	T->165:85:165 D->155/00/-23211 	T->165:155:00 D->165/85/2007 	T->01:31:52 D->02/03/2024 	T->07:215:165 D->155/00/-23131 	T->165:85:07 D->215/00/-23211 	T->165:85:07 D->215/165/-25856 	T->07:215:00 D->00/00/257 	T->07:232:08 D->28/40/1287 	T->155:00:165 D->85/07/-10331 	T->155:00:165 D->85/07/-10331 	T->07:165:155 D->00/165/21767 	T->01:01:07 D->208/00/0 	T->07:07:07 D->232/155/165 	T->07:215:165 D->155/00/-23211 	T->215:165:155 D->00/165/21767 	T->85:07:215 D->165/155/165 	T->20:55:25 D->02/07/-6133 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 --------------------------- 	T->165:85:07 D->215/165/-25856 	T->232:22:15 D->09/01/775 	T->165:85:07 D->215/165/-25856 	T->07:215:165 D->85/07/-10281 	T->47:32:29 D->163/05/-22442 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/28/10753 	T->07:215:165 D->85/07/-10411 	T->155:00:165 D->155/00/-23211 	T->09:09:10 D->220/181/-24575 	T->165:155:00 D->165/85/2007 	T->03:01:03 D->07/232/-23141 	T->165:85:07 D->215/22/5431 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856 
29 	T->232:22:41 D->49/01/775 	T->165:155:00 D->165/85/2007 	T->165:155:00 D->165/85/2007 	T->08:220:168 D->158/03/-22440 	T->165:155:00 D->165/155/165 	T->85:07:215 D->22/49/7681 	T->07:232:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->00:165:85 D->07/215/-23141 	T->33:01:03 D->07/232/5918 	T->165:85:07 D->215/165/-25856 --------------------------- 	T->07:215:165 D->155/00/-23211 	T->165:155:00 D->165/85/2007 	T->01:37:43 D->02/03/2024 	T->155:00:165 D->155/00/-23131 	T->07:215:165 D->155/00/-23211 	T->165:85:07 D->215/00/-23211 	T->07:208:00 D->00/00/257 	T->07:232:09 D->34/55/1799 	T->155:00:165 D->85/07/-10411 	T->155:00:165 D->85/07/-10331 	T->215:165:155 D->00/165/21767 	T->01:01:07 D->208/165/-25856 	T->85:07:215 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->215:165:155 D->00/165/21767 	T->85:07:215 D->165/155/165 	T->27:30:25 D->02/07/-6122 	T->215:165:155 D->00/165/21767 	T->165:85:07 D->215/165/-25856 --------------------------- 	T->165:85:07 D->215/165/-25856 	T->232:22:17 D->13/01/775 	T->165:85:07 D->215/165/-25856 	T->165:155:00 D->165/85/2007 	T->10:221:02 D->15/08/1028 	T->85:07:215 D->165/155/165 	T->03:07:232 D->22/41/12545 	T->07:215:165 D->155/00/-23211 	T->07:215:165 D->155/00/-23211 	T->173:90:08 D->220/168/-25085 	T->00:165:165 D->155/00/-23141 	T->00:165:85 D->07/215/5681 	T->01:03:07 D->232/165/-25856 	T->165:85:07 D->215/165/-25856 	T->165:85:07 D->215/165/-25856

Get an EEPROM data dump without converting to time/date. See if the values read from EEPROM are "random" as described about the time/date you show.

Here it is. The random numbers showed up

12:02:15.732 -> Address 112: 0
12:02:16.251 -> Address 113: 165
12:02:16.738 -> Address 114: 85
12:02:17.256 -> Address 115: 7
12:02:17.742 -> Address 116: 215
12:02:18.275 -> Address 117: 165
12:02:18.761 -> Address 118: 155
12:02:19.237 -> Address 119: 0
12:02:19.757 -> Address 120: 165
12:02:20.244 -> Address 121: 85
12:02:20.788 -> Address 122: 7
12:02:21.252 -> Address 123: 215

I am currently searching about the 165 rtc issue

Can you DISPLAY the data you want to write to EEPROM in the desired format BEFORE writing to EEPROM? This is so you know the data is what you expect (or unexpectedly random) before entering EEPROM.

Is it possible that you are writing to the EEPROM "bottom to top" (push onto a stack) and reading "bottom to top" (FIFO) but arranging the data as if it was "top to bottom" (LIFO/pop from the stack).

And one final thought... in you experimenting with EEPROM, did your code ever send 100,000 writes to the EEPROM? The result of writing to the EEPROM more than its expected number of cycles is unknown (random) stored values.

1 Like

Post #4 already mentioned that you're writing outside the EEPROM. An Uno as in your schematic only has 1024 bytes of EEPROM. One of the later posts also mentions it.

On a side note:
Instead of storing a the separate pieces of a date/time, you can store the unixtime from the RTC in the EEPROM. You're now storing 7 bytes for a date/time, it can be limited to 4 bytes by using the unixtime (seconds since 1970). When you want to display the date/time of a user, you read back the unixtime and display it in a formatted way. So anything above location 1023 more than likely overwrites previous data.

I'm not sure if I have figured out exactly what you want to store. in EEPROM. The number of the user and the times that that user attended. On an Arduino, this will probably what I would write for an attendance register that uses EEPROM to store the information.

1 Like

This does not look good at all

14:22:48.474 -> Number of write cycles: 151324467

Not too long ago the question, "Can you write EEPROM beyond 100,00 cycles?" The answer was "Yes, but storage is unreliable." You have a Pillar of EEPROM Knowledge, and can now answer questions first-hand. You could experiment and check for reliable addresses of the EEPROM... and note unreliable addresses.

EEPROM modules are about US$2 for 256k.

1 Like

Got it.

Maybe OP's RTC module has an EEPROM. @1von, you you provide a link to the RTC module that you bought?

1 Like

With the limitations of the Uno's EEPROM size, I would probably use something like below; it can be used as a framework work your code. I do not have a fingerprint reader so the user number is entered via the serial monitor.

For each entry in the attendance register, you have two pieces of data; the user number (from fingerprint reader or serial) and the unixtime. You can combine those two in a struct or class; I've used a struct.

struct RECORD
{
  uint8_t userNumber;
  uint32_t timestamp;
};

uint8_t is the same as byte, uint32_t is the same as unsigned long. I have used an uint8_t type for the user number which allows for 256 users. User 0 is not used (if I understand your code from the opening post correctly) so a maximum of 255 users. If this is not enough, you can change the user number to an uint16_t for roughly 65000 users.

You will need to keep some space in the EEPROM to store the number of records in the attendance register; I have used the last two bytes for that.

// the last two bytes of the EEPROM are used to store the number of records in the attendance register
#define ADDR_NUMRECORDS (EEPROM.length() - sizeof(uint16_t))
// #define ADDR_NUMRECORDS 1022

EEPROM.length() gives you the size of the EEPROM in bytes. sizeof() gives you the size of a variable, in this case the size of of an unsigned 16-bit integer (two bytes); that will allow a theoretical maximum of over 65000 records (but remember that the size of the EEPROM limits this).

The line that is currently commented out is for my use as I run this on a Mega and wanted to limit this to the size of the EEPROM on an Uno. You'll have to check the final sketch below.

I will skip a description of the setup() function and go straight to a description of loop(). As said, I don't have the fingerprint reader so I've simulated this with serial input from (e.g.) Serial Monitor.

void loop()
{
  // simulate fingerprint reader
  if (Serial.available())
  {
    uint8_t ch = Serial.read();
    if (ch >= '1' && ch <= '9')
    {
      // character to byte
      ch -= '0';
    }
    ...
    ...

If you enter a number between 1 and 9 in the serial monitor, this piece converts the text to the number; it's very basic but gives you a user number between 1 and 9 in the same way as the fingerprint reader would.

    if (ch > 0 && ch <= 9)
    {
	  // get date/time
      DateTime now = rtc.now();
      // print for debugging
      Serial.print(F("User "));
      Serial.print(ch);
      Serial.print(F(", unixtime = "));
      Serial.print(now.unixtime());
      Serial.print(F(", "));
      printDT(now);

      // create the record with the user data
      RECORD record;
      record.userNumber = ch;
      record.timestamp = now.unixtime();

      // save the record to EEPROM
      saveRecordToEEPROM(record);
    }
  }
}

If the number is between 1 and 9, it's a known / valid user and the current date/time is retrieved, printed for debugging, a record is created and next save to the EEPROM.

The following function saves the record to EEPROM

/*
   Save data to EEPROM
   In:
    record to save
*/
void saveRecordToEEPROM(RECORD &rec)
{
  // get current number of records
  uint8_t numRecords;
  EEPROM.get(ADDR_NUMRECORDS, numRecords);
  // calculate address in EEPROM
  uint16_t eepLoc = numRecords * sizeof(RECORD);
  if (eepLoc + sizeof(RECORD) >= ADDR_NUMRECORDS)
  {
    Serial.println(F("Attendance register full"));
    for (;;);
  }
  Serial.print(F("Location to be used = "));
  Serial.println(eepLoc);

  // save to EEPROM
  EEPROM.put(eepLoc, rec);
  // update number of records in EEPROM
  numRecords++;
  EEPROM.put(ADDR_NUMRECORDS, numRecords);
}

This function takes a parameter which is a reference (note the ampersand) to the record that you want to save.

It first retrieves the number of records in stored at ADDR_NUMRECORDS. It uses EEPROM.get() instead of EEPROM.read(); with EEPROM.get() you don't have to worry about what you're reading, in this case EEPROM.get() replaces two EEPROM.read() statements to get the number of records.

Next the location in EEPROM is calculated. If this location plus the size of a record exceeds (or is equal to) the location where you store the number of records, your attendance register is full; in this implementation, a message is printed and the code hangs forever.

If there is still space (on an Uno the limit is 1022 / 5 = 204 records), the location where the record is stored is printed for debugging and next the record is saved using EEPROM.put(). Similar to EEPROM.get(), with EEPROM.put() you don't have to worry about what you are saving, it will automatically save the full record (and there is no need to write the 5 individual bytes). EEPROM.put() has the additional advantage that it calls EEPROM.update() under the hood which does not write a byte to EEPROM if the byte did not change.

Lastly, the number of records (the last two bytes of the EEPROM) is updated.

There is a similar function to read a record from EEPROM.

/*
   read a record from EEPROM
   In
    number of record to read
    where to store (in ram)
   Returns:
    true if a record was retrieved, false if the record number was invalid
*/
bool readRecordFromEEPROM(uint8_t recordNumber, RECORD &rec)
{
  // calculate address in EEPROM
  uint16_t eepLoc = recordNumber * sizeof(RECORD);
  if (eepLoc + sizeof(RECORD) >= ADDR_NUMRECORDS)
  {
    Serial.println(F("Invalid record number"));
    return false;
  }

  EEPROM.get(eepLoc, rec);

  return true;
}

I think that you should be able to follow what it does.

To display the records in the attendance register, you can use the below function.

/*
   Display the records
   In:
    userID; if 0, display all records, else display record for specific user
*/
void displayRecords(uint8_t userID)
{
  // get current number of records
  uint8_t numRecords;
  EEPROM.get(ADDR_NUMRECORDS, numRecords);
  for (uint8_t recCnt = 0; recCnt < numRecords; recCnt++)
  {
    RECORD record;

    if (readRecordFromEEPROM(recCnt, record))
    {
      if (userID == 0 || record.userNumber == userID)
      {
        Serial.print(F("Record "));
        Serial.print(recCnt);
        Serial.print(F("\tUser "));
        Serial.print(record.userNumber);
        Serial.print(F("\tunixtime "));
        Serial.print(record.timestamp);
        Serial.print(F("\t"));

        // create a date/time object from the unixtime
        DateTime dt = DateTime(record.timestamp);
        // and print it
        printDT(dt);
      }
    }
  }
}

It takes one parameter, the user number (userID) of the user; if 0, it displays all records, else it displays the records for a specific user. I think it's self-explaining.

There is a second function to display all records.

/*
   Display all records
*/
void displayRecords()
{
  displayRecords(0);
}

This simply calls the previous function with the value 0.

And you've basically already seen the below function in my previous code.

/*
   Print formatted date and time
   In:
    data/time object
*/
void printDT(DateTime dt)
{
  Serial.print(dt.year(), DEC);
  Serial.print('/');
  if (dt.month() < 10) Serial.print("0");
  Serial.print(dt.month(), DEC);
  Serial.print('/');
  if (dt.day() < 10) Serial.print("0");
  Serial.print(dt.day(), DEC);
  Serial.print(" (");
  Serial.print(daysOfTheWeek[dt.dayOfTheWeek()]);
  Serial.print(") ");
  if (dt.hour() < 10) Serial.print("0");
  Serial.print(dt.hour(), DEC);
  Serial.print(':');
  if (dt.minute() < 10) Serial.print("0");
  Serial.print(dt.minute(), DEC);
  Serial.print(':');
  if (dt.second() < 10) Serial.print("0");
  Serial.print(dt.second(), DEC);
  Serial.println();
}

And lastly the setup() function. It should look familiar from the previous code, the only extra is the display of the current records.

void setup()
{
  Serial.begin(115200);

  // initialise RTC
  if (!rtc.begin())
  {
    Serial.println("Couldn't find RTC");
    Serial.flush();
    while (1);
  }

  // clear the attendance register
  //EEPROM.put(ADDR_NUMRECORDS, 0);

  // display all records
  displayRecords();

}

The first time that you upload and run, your will need to uncomment //EEPROM.put(ADDR_NUMRECORDS, 0); to set the number of records to 0. Next time you comment the line out again and upload.

Typical output

12:35:31.620 -> Record 0	User 1	unixtime 1714726605	2024/05/03 (Friday) 08:56:45
12:35:31.620 -> Record 1	User 1	unixtime 1714726616	2024/05/03 (Friday) 08:56:56
12:35:31.620 -> Record 2	User 9	unixtime 1714727194	2024/05/03 (Friday) 09:06:34
12:35:31.653 -> Record 3	User 8	unixtime 1714727625	2024/05/03 (Friday) 09:13:45
12:35:31.653 -> Record 4	User 7	unixtime 1714727645	2024/05/03 (Friday) 09:14:05
12:35:31.653 -> Record 5	User 1	unixtime 1714729350	2024/05/03 (Friday) 09:42:30
12:35:31.653 -> Record 6	User 9	unixtime 1714732233	2024/05/03 (Friday) 10:30:33
12:35:31.653 -> Record 7	User 8	unixtime 1714732709	2024/05/03 (Friday) 10:38:29
// adding user with number 4
12:35:44.851 -> User 4, unixtime = 1714739743, 2024/05/03 (Friday) 12:35:43
12:35:44.851 -> Location to be used = 40
// reset to display all records
12:35:52.930 -> Record 0	User 1	unixtime 1714726605	2024/05/03 (Friday) 08:56:45
12:35:52.963 -> Record 1	User 1	unixtime 1714726616	2024/05/03 (Friday) 08:56:56
12:35:52.963 -> Record 2	User 9	unixtime 1714727194	2024/05/03 (Friday) 09:06:34
12:35:52.963 -> Record 3	User 8	unixtime 1714727625	2024/05/03 (Friday) 09:13:45
12:35:52.963 -> Record 4	User 7	unixtime 1714727645	2024/05/03 (Friday) 09:14:05
12:35:52.963 -> Record 5	User 1	unixtime 1714729350	2024/05/03 (Friday) 09:42:30
12:35:52.963 -> Record 6	User 9	unixtime 1714732233	2024/05/03 (Friday) 10:30:33
12:35:52.963 -> Record 7	User 8	unixtime 1714732709	2024/05/03 (Friday) 10:38:29
12:35:53.026 -> Record 8	User 4	unixtime 1714739743	2024/05/03 (Friday) 12:35:43

Full code that generated the above output

#include <EEPROM.h>
#include <Wire.h>
#include <RTClib.h>

const char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

// the last two bytes of the EEPROM are used to store the number of records in the attendance register
//#define ADDR_NUMRECORDS (EEPROM.length() - sizeof(uint16_t))
#define ADDR_NUMRECORDS 1022

// rtc object
RTC_DS3231 rtc;

// a struct to hold a record
struct RECORD
{
  uint8_t userNumber;
  uint32_t timestamp;
};

void setup()
{
  Serial.begin(115200);

  // initialise RTC
  if (!rtc.begin())
  {
    Serial.println("Couldn't find RTC");
    Serial.flush();
    while (1);
  }

  // clear the attendance register
  //EEPROM.put(ADDR_NUMRECORDS, 0);

  // display all records
  displayRecords();

}

void loop()
{
  // simulate fingerprint reader
  if (Serial.available())
  {
    uint8_t ch = Serial.read();
    if (ch >= '1' && ch <= '9')
    {
      // character to byte
      ch -= '0';
    }

    if (ch > 0 && ch <= 9)
    {
      DateTime now = rtc.now();
      Serial.print(F("User "));
      Serial.print(ch);
      Serial.print(F(", unixtime = "));
      Serial.print(now.unixtime());
      Serial.print(F(", "));
      printDT(now);

      // create the record with the user data
      RECORD record;
      record.userNumber = ch;
      record.timestamp = now.unixtime();

      // save the record to EEPROM
      saveRecordToEEPROM(record);
    }
  }
}

/*
   Print formatted date and time
   In:
    data/time object
*/
void printDT(DateTime dt)
{
  Serial.print(dt.year(), DEC);
  Serial.print('/');
  if (dt.month() < 10) Serial.print("0");
  Serial.print(dt.month(), DEC);
  Serial.print('/');
  if (dt.day() < 10) Serial.print("0");
  Serial.print(dt.day(), DEC);
  Serial.print(" (");
  Serial.print(daysOfTheWeek[dt.dayOfTheWeek()]);
  Serial.print(") ");
  if (dt.hour() < 10) Serial.print("0");
  Serial.print(dt.hour(), DEC);
  Serial.print(':');
  if (dt.minute() < 10) Serial.print("0");
  Serial.print(dt.minute(), DEC);
  Serial.print(':');
  if (dt.second() < 10) Serial.print("0");
  Serial.print(dt.second(), DEC);
  Serial.println();
}

/*
   Display the records
   In:
    userID; if 0, display all records, else display record for specific user
*/
void displayRecords(uint8_t userID)
{
  // get current number of records
  uint8_t numRecords;
  EEPROM.get(ADDR_NUMRECORDS, numRecords);
  for (uint8_t recCnt = 0; recCnt < numRecords; recCnt++)
  {
    RECORD record;

    if (readRecordFromEEPROM(recCnt, record))
    {
      if (userID == 0 || record.userNumber == userID)
      {
        Serial.print(F("Record "));
        Serial.print(recCnt);
        Serial.print(F("\tUser "));
        Serial.print(record.userNumber);
        Serial.print(F("\tunixtime "));
        Serial.print(record.timestamp);
        Serial.print(F("\t"));

        // create a date/time object from the unixtime
        DateTime dt = DateTime(record.timestamp);
        // and print it
        printDT(dt);
      }
    }
  }
}

/*
   Display all records
*/
void displayRecords()
{
  displayRecords(0);
}

/*
   Save data to EEPROM
   In:
    record to save
*/
void saveRecordToEEPROM(RECORD &rec)
{
  // get current number of records
  uint8_t numRecords;
  EEPROM.get(ADDR_NUMRECORDS, numRecords);
  // calculate address in EEPROM
  uint16_t eepLoc = numRecords * sizeof(RECORD);
  if (eepLoc + sizeof(RECORD) >= ADDR_NUMRECORDS)
  {
    Serial.println(F("Attendance register full"));
    for (;;);
  }
  Serial.print(F("Location to be used = "));
  Serial.println(eepLoc);

  // save to EEPROM
  EEPROM.put(eepLoc, rec);
  // update number of records in EEPROM
  numRecords++;
  EEPROM.put(ADDR_NUMRECORDS, numRecords);
}

/*
   read a record from EEPROM
   In
    number of record to read
    where to store (in ram)
   Returns:
    true if a record was retrieved, false if the record number was invalid
*/
bool readRecordFromEEPROM(uint8_t recordNumber, RECORD &rec)
{
  // calculate address in EEPROM
  uint16_t eepLoc = recordNumber * sizeof(RECORD);
  if (eepLoc + sizeof(RECORD) >= ADDR_NUMRECORDS)
  {
    Serial.println(F("Invalid record number"));
    return false;
  }

  EEPROM.get(eepLoc, rec);

  return true;
}

If you do not get output as shown above, your EEPROM has gone to heaven :wink:

Ask what you don't understand.

1 Like

no wayyy, thanks dude. I'll try this one right now! I'll give you an update on this ASAP

hey man, I followed some of your advice and solutions till I got it to work, I also replaced the EEPROM, since I had a spare Arduino so I took it's EEPROM. The data is already what I wanted it to be and everything is working like how It should be. I just want to say thank you from the bottom of my heart for helping and staying patient with me, because I know working with someone who has almost little to no experience can be a pain in the ass hahaha. This project is for our research and 2 days from now is our deadline for it, so you and the other guys helping me with this means a lot and I hope I can give back to the community, someday. Thank you so much to you all.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.