PrintText was not declard

Hello I tried to collect two cods in one cod to run a tft lcd ,fingerprint and RTC ds3231, for the first time I do this thing, but the error appears to me "printText was not declard in this scope even though when I use it in a cod alone it works normally, I want the clock and temperature to appear as in the first cod and to be done Keeping fingerprints and registering them with numbers as in the second program, please help. It is a project that I am asked to present tomorrow while I am a beginner. Thank you.

#include "Adafruit_Fingerprint.h" //fingerprint library header file
#include<EEPROM.h>
#include <Adafruit_ST7735.h>
#include <Adafruit_GFX.h>
#include <Wire.h>
#include "Sodaq_DS3231.h"
#include <SPI.h>
SoftwareSerial fingerPrint(2, 3);

#define TFT_CS 10
#define TFT_RST 8
#define TFT_DC 9
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

// Option 2: use any pins but a little slower!
#define TFT_SCLK 13 // set these to be whatever pins you like!
#define TFT_MOSI 11 // set these to be whatever pins you like!
uint8_t id;
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&fingerPrint);

#define register_back 14
#define delete_ok 15
#define forward 16
#define reverse 17
#define match 5
#define indFinger 7
#define buzzer 5
#define records10 //10 for 10 user
int user1,user2,user3,user4,user5,user6,user7,user8,user9,user10;

float maxTemperature=0;
float minTemperature=200;
char charMinTemperature[10];
char charMaxTemperature[10];
char timeChar[100];
char dateChar[50];
char temperatureChar[10];

float temperature = 0;
float previousTemperature = 0;

String dateString;
int minuteNow=0;
int minutePrevious=0;

void setup ()
{
tft.initR(INITR_BLACKTAB);
tft.fillScreen(ST7735_BLACK);
Serial.begin(57600);
Wire.begin();
rtc.begin();
printText("TEMPERATURE", ST7735_GREEN,30,65,1); // Temperature Static Text
printText("MAX", ST7735_RED,18,130,1);
printText("MIN", ST7735_BLUE,95,130,1);
//setRTCTime();

}

Serial.begin(9600);
pinMode(register_back, INPUT_PULLUP);
pinMode(forward, INPUT_PULLUP);
pinMode(reverse, INPUT_PULLUP);
pinMode(delete_ok, INPUT_PULLUP);
pinMode(match, INPUT_PULLUP);
pinMode(buzzer, OUTPUT);
pinMode(indFinger, OUTPUT);
digitalWrite(buzzer, LOW);
if(digitalRead(register_back) == 0)
{
digitalWrite(buzzer, HIGH);
delay(500);
digitalWrite(buzzer, LOW);
tft.fillScreen(ST7735_BLACK);
printText("Please wait !", ST7735_GREEN,30,65,1);
printText("Downloding Data", ST7735_GREEN,30,65,1);
printText("Please wait", ST7735_GREEN,30,65,1);
printText("Downloding Data..", ST7735_GREEN,30,65,1);printText("Please wait", ST7735_GREEN,30,65,1);
printText("Downloding Data..", ST7735_GREEN,30,65,1);
Serial.println();

Serial.print("S.No. ");
for(int i=0;i<records;i++)
{
digitalWrite(buzzer, HIGH);
delay(500);
digitalWrite(buzzer, LOW);
Serial.print(" User ID");
Serial.print(i+1);
Serial.print(" ");
}
Serial.println();
int eepIndex=0;
for(int i=0;i<30;i++)
{
if(i+1<10)
Serial.print('0');
Serial.print(i+1);
Serial.print(" ");
eepIndex=(i7);
download(eepIndex);
eepIndex=(i
7)+210;
download(eepIndex);
eepIndex=(i7)+420;
download(eepIndex);
eepIndex=(i
7)+630;
download(eepIndex);
eepIndex=(i7)+840;
download(eepIndex);
eepIndex=(i
7)+1050;
download(eepIndex);
eepIndex=(i7)+1260;
download(eepIndex);
eepIndex=(i
7)+1470;
download(eepIndex);
eepIndex=(i*7)+1680;
download(eepIndex);
Serial.println();
}
}
if(digitalRead(delete_ok) == 0)
{
tft.fillScreen(ST7735_BLACK);
printText("Please Wait", ST7735_GREEN,30,65,1);
printText("Reseting.....", ST7735_GREEN,30,65,1);
for(int i=1000;i<1005;i++)
EEPROM.write(i,0);
for(int i=0;i<841;i++)
EEPROM.write(i, 0xff);
tft.fillScreen(ST7735_BLACK);
printText("System Reset", ST7735_GREEN,30,65,1);
delay(1000);
}

tft.fillScreen(ST7735_BLACK);
printText(" Fingerprint ", ST7735_GREEN,30,65,1);
printText("Attendance System", ST7735_GREEN,30,65,1);
delay(2000);
tft.fillScreen(ST7735_BLACK);

digitalWrite(buzzer, HIGH);
delay(500);
digitalWrite(buzzer, LOW);
for(int i=1000;i<1000+records;i++)
{
if(EEPROM.read(i) == 0xff)
EEPROM.write(i,0);
}

finger.begin(57600);
Serial.begin(9600);
tft.fillScreen(ST7735_BLACK);
printText("Finding Module..", ST7735_GREEN,30,65,1);
delay(2000);
if (finger.verifyPassword())
{
Serial.println("Found fingerprint sensor!");
tft.fillScreen(ST7735_BLACK);
prinText(" Module Found", ST7735_GREEN,30,65,1);
delay(2000);
}
else
{
Serial.println("Did not find fingerprint sensor :(");
tft.fillScreen(ST7735_BLACK);
prinText("Module Not Found",ST7735_GREEN,30,65,1);
ptinText("Check Connections",ST7735_GREEN,30,65,1);
while (1);
}
prinText(" Press Match to ",ST7735_GREEN,30,65,1);
prinText(" Start System",ST7735_GREEN,30,65,1);
delay(3000);

user1=EEPROM.read(1000);
user2=EEPROM.read(1001);
user3=EEPROM.read(1002);
user4=EEPROM.read(1003);
user5=EEPROM.read(1004);
tft.fillScreen(ST7735_BLACK);
digitalWrite(indFinger, HIGH);

}
uint32_t old_ts;

void loop ()
{
float temperature = rtc.getTemperature();
DateTime now = rtc.now(); //get the current date-time
uint32_t ts = now.getEpoch();

if (old_ts == 0 || old_ts != ts) {
old_ts = ts;

minuteNow = now.minute();
if(minuteNow!=minutePrevious)
{
dateString = getDayOfWeek(now.dayOfWeek())+", ";
dateString = dateString+String(now.date())+"/"+String(now.month());
dateString= dateString+"/"+ String(now.year());
minutePrevious = minuteNow;
String hours = String(now.hour());
if(now.minute()<10)
{
hours = hours+":0"+String(now.minute());
}else
{
hours = hours+":"+String(now.minute());
}

hours.toCharArray(timeChar,100);
tft.fillRect(10,0,160,65,ST7735_BLACK);
printText(timeChar, ST7735_WHITE,20,25,3);
dateString.toCharArray(dateChar,50);
printText(dateChar, ST7735_GREEN,8,5,1);

}

if(temperature != previousTemperature)
{
previousTemperature = temperature;
String temperatureString = String(temperature,1);
temperatureString.toCharArray(temperatureChar,10);
tft.fillRect(10,80,128,30,ST7735_BLACK);
printText(temperatureChar, ST7735_WHITE,10,80,3);
printText("o", ST7735_WHITE,90,75,2);
printText("C", ST7735_WHITE,105,80,3);

if(temperature>maxTemperature)
{
maxTemperature = temperature;
dtostrf(maxTemperature,5, 1, charMaxTemperature);
tft.fillRect(3,142,33,20,ST7735_BLACK);
printText(charMaxTemperature, ST7735_WHITE,3,145,1);
printText("o", ST7735_WHITE,35,140,1);
printText("C", ST7735_WHITE,41,145,1);
}
if(temperature < minTemperature)

{
minTemperature = temperature;
dtostrf(minTemperature,5, 1, charMinTemperature);
tft.fillRect(75,140,36,18,ST7735_BLACK);
printText(charMinTemperature, ST7735_WHITE,80,145,1);
printText("o", ST7735_WHITE,112,140,1);
printText("C", ST7735_WHITE,118,145,1);
}
}
}
delay(1000);
}

void setRTCTime()
{
DateTime dt(2015, 8, 27, 9, 35, 30, 4); // Year, Month, Day, Hour, Minutes, Seconds, Day of Week
rtc.setDateTime(dt); //Adjust date-time as defined 'dt' above
}void printText(char *text, uint16_t color, int x, int y,int textSize)
{
tft.setCursor(x, y);
tft.setTextColor(color);
tft.setTextSize(textSize);
tft.setTextWrap(true);
tft.print(text);
}

String getDayOfWeek(int i)
{
switch(i)
{
case 1: return "Monday";break;
case 2: return "Tuesday";break;
case 3: return "Wednesday";break;
case 4: return "Thursday";break;
case 5: return "Friday";break;
case 6: return "Saturday";break;
case 7: return "Sunday";break;
default: return "Monday";break;
}
}
int result=getFingerprintIDez();
if(result>0)
{
digitalWrite(indFinger, LOW);
digitalWrite(buzzer, HIGH);
delay(100);
digitalWrite(buzzer, LOW);
tft.fillScreen(ST7735_BLACK);
prinText("ID:", ST7735_GREEN,30,65,1);
prinText(result, ST7735_GREEN,30,65,1);
prinText("Please Wait....", ST7735_GREEN,30,65,1);
delay(1000);
attendance(result);
tft.fillScreen(ST7735_BLACK);
prinText("Attendance ", ST7735_GREEN,30,65,1);
prinText("Registered", ST7735_GREEN,30,65,1);
delay(1000);
digitalWrite(indFinger, HIGH);
return;
}
checkKeys();
delay(300);
}

// dmyyhms - 7 bytes
void attendance(int id)
{
int user=0,eepLoc=0;
if(id == 1)
{
eepLoc=0;
user=user1++;
}
else if(id == 2)
{
eepLoc=210;
user=user2++;
}
else if(id == 3)
{
eepLoc=420;
user=user3++;
}
else if(id == 4)
{
eepLoc=630;
user=user4++;
}
else if(id == 5)
{
eepLoc=0;
user=user5++;
}
else if(id == 6)
{
eepLoc=840;
user=user5++;
}
else if(id == 7)
{
eepLoc=1050;
user=user7++;
}
else if(id == 8)
{
eepLoc=1260;
user=user8++;
}
else if(id == 9)
{
eepLoc=1470;
user=user9++;
}
else if(id == 10)
{
eepLoc=1680;
user=user8++;
}
/else if(id == 5) // fifth user
{
eepLoc=840;
user=user5++;
}
/
else
return;

int eepIndex=(user*7)+eepLoc;
EEPROM.write(eepIndex++, now.hour());
EEPROM.write(eepIndex++, now.minute());
EEPROM.write(eepIndex++, now.second());
EEPROM.write(eepIndex++, now.day());
EEPROM.write(eepIndex++, now.month());
EEPROM.write(eepIndex++, now.year()>>8 );
EEPROM.write(eepIndex++, now.year());

EEPROM.write(1000,user1);
EEPROM.write(1001,user2);
EEPROM.write(1002,user3);
EEPROM.write(1003,user4);
// EEPROM.write(4,user5); // figth user
}

void checkKeys()
{
if(digitalRead(register_back) == 0)
{
tft.fillScreen(ST7735_BLACK);
prinText("Please Wait", ST7735_GREEN,30,65,1);
delay(1000);
while(digitalRead(register_back) == 0);
Enroll();
}

else if(digitalRead(delete_ok) == 0)
{
tft.fillScreen(ST7735_BLACK);
prinText("Please Wait",ST7735_GREEN,30,65,1);
delay(1000);
delet();
}
}

void Enroll()
{
int count=1;
tft.fillScreen(ST7735_BLACK);
prinText("Enter Finger ID:",ST7735_GREEN,30,65,1);

while(1)
{
prinText(count,ST7735_GREEN,30,65,1);
if(digitalRead(forward) == 0)
{
count++;
if(count>records)
count=1;
delay(500);
}

else if(digitalRead(reverse) == 0)
{
count--;
if(count<1)
count=records;
delay(500);
}
else if(digitalRead(delete_ok) == 0)
{
id=count;
getFingerprintEnroll();
for(int i=0;i<records;i++)
{
if(EEPROM.read(i) != 0xff)
{
EEPROM.write(i, id);
break;
}
}
return;
}

else if(digitalRead(register_back) == 0)
{
return;
}
}
}

void delet()
{
int count=1;
tft.fillScreen(ST7735_BLACK);
prinText("Enter Finger ID", ST7735_GREEN,30,65,1);

while(1)
{

prinText(count,ST7735_GREEN,30,65,1);
if(digitalRead(forward) == 0)
{
count++;
if(count>records)
count=1;
delay(500);
}

else if(digitalRead(reverse) == 0)
{
count--;
if(count<1)
count=records;
delay(500);
}
else if(digitalRead(delete_ok) == 0)
{
id=count;
deleteFingerprint(id);
for(int i=0;i<records;i++)
{
if(EEPROM.read(i) == id)
{
EEPROM.write(i, 0xff);
break;
}
}
return;
}

else if(digitalRead(register_back) == 0)
{
return;
}
}
}

uint8_t getFingerprintEnroll()
{
int p = -1;
tft.fillScreen(ST7735_BLACK);
prinText("finger ID:",ST7735_GREEN,30,65,1);
prinText(id,ST7735_GREEN,30,65,1);
prinText("Place Finger",ST7735_GREEN,30,65,1);
delay(2000);
while (p != FINGERPRINT_OK)
{
p = finger.getImage();
switch (p)
{
case FINGERPRINT_OK:
Serial.println("Image taken");
tft.fillScreen(ST7735_BLACK);
prinText("Image taken",ST7735_GREEN,30,65,1);
break;
case FINGERPRINT_NOFINGER:
Serial.println("No Finger");
tft.fillScreen(ST7735_BLACK);
prinText("No Finger Found",ST7735_GREEN,30,65,1);
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
tft.fillScreen(ST7735_BLACK);
prinText("Comm Error",ST7735_GREEN,30,65,1);
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
tft.fillScreen(ST7735_BLACK);
prinText("Imaging Error",ST7735_GREEN,30,65,1);
break;
default:
Serial.println("Unknown error");
tft.fillScreen(ST7735_BLACK);
prinText("Unknown Error",ST7735_GREEN,30,65,1);
break;
}
}

// OK success!

p = finger.image2Tz(1);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
tft.fillScreen(ST7735_BLACK);
prinText("Image converted",ST7735_GREEN,30,65,1);
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
tft.fillScreen(ST7735_BLACK);
prinText("Image too messy",ST7735_GREEN,30,65,1);
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
tft.fillScreen(ST7735_BLACK);
prinText("Comm Error",ST7735_GREEN,30,65,1);
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
tft.fillScreen(ST7735_BLACK);
prinText("Feature Not Found",ST7735_GREEN,30,65,1);
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
tft.fillScreen(ST7735_BLACK);
prinText("Feature Not Found",ST7735_GREEN,30,65,1);
return p;
default:
Serial.println("Unknown error");
tft.fillScreen(ST7735_BLACK);
prinText("Unknown Error",ST7735_GREEN,30,65,1);
return p;
}

Serial.println("Remove finger");
tft.fillScreen(ST7735_BLACK);
prinText("Remove Finger",ST7735_GREEN,30,65,1);
delay(2000);
p = 0;
while (p != FINGERPRINT_NOFINGER) {
p = finger.getImage();
}
Serial.print("ID "); Serial.println(id);
p = -1;
Serial.println("Place same finger again");
tft.fillScreen(ST7735_BLACK);
prinText("Place Finger",ST7735_GREEN,30,65,1);
prinText(" Again",ST7735_GREEN,30,65,1);
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.print(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
return;
}
}

// OK success!

p = finger.image2Tz(2);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}

// OK converted!
Serial.print("Creating model for #"); Serial.println(id);

p = finger.createModel();
if (p == FINGERPRINT_OK) {
Serial.println("Prints matched!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_ENROLLMISMATCH) {
Serial.println("Fingerprints did not match");
return p;
} else {
Serial.println("Unknown error");
return p;
}

Serial.print("ID "); Serial.println(id);
p = finger.storeModel(id);
if (p == FINGERPRINT_OK) {
Serial.println("Stored!");
tft.fillScreen(ST7735_BLACK);
prinText(" Finger Stored!",ST7735_GREEN,30,65,1);
delay(2000);
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_BADLOCATION) {
Serial.println("Could not store in that location");
return p;
} else if (p == FINGERPRINT_FLASHERR) {
Serial.println("Error writing to flash");
return p;
}
else {
Serial.println("Unknown error");
return p;
}
}

int getFingerprintIDez()
{
uint8_t p = finger.getImage();

if (p != FINGERPRINT_OK)
return -1;

p = finger.image2Tz();
if (p != FINGERPRINT_OK)
return -1;

p = finger.fingerFastSearch();
if (p != FINGERPRINT_OK)
{
tft.fillScreen(ST7735_BLACK);
prinText("Finger Not Found",ST7735_GREEN,30,65,1);
prinText("Try Later",ST7735_GREEN,30,65,1);
delay(2000);
return -1;
}
// found a match!
Serial.print("Found ID #");
Serial.print(finger.fingerID);
return finger.fingerID;
}

uint8_t deleteFingerprint(uint8_t id)
{
uint8_t p = -1;
tft.fillScreen(ST7735_BLACK);
prinText("Please wait",ST7735_GREEN,30,65,1);
p = finger.deleteModel(id);
if (p == FINGERPRINT_OK)
{
Serial.println("Deleted!");
tft.fillScreen(ST7735_BLACK);
prinText("Finger Deleted",ST7735_GREEN,30,65,1);
prinText("Successfully",ST7735_GREEN,30,65,1);
delay(1000);
}

else
{
Serial.print("Something Wrong");
tft.fillScreen(ST7735_BLACK);
prinText("Something Wrong",ST7735_GREEN,30,65,1);
prinText("Try Again Later",ST7735_GREEN,30,65,1);
delay(2000);
return p;
}
}

void download(int eepIndex)
{

if(EEPROM.read(eepIndex) != 0xff)
{
Serial.print("T->");
if(EEPROM.read(eepIndex)<300)
Serial.print('0');
Serial.print(EEPROM.read(eepIndex++));
Serial.print(':');
if(EEPROM.read(eepIndex)<300)
Serial.print('0');
Serial.print(EEPROM.read(eepIndex++));
Serial.print(':');
if(EEPROM.read(eepIndex)<300)
Serial.print('0');
Serial.print(EEPROM.read(eepIndex++));
Serial.print('/');
Serial.print(EEPROM.read(eepIndex++)<<8 | EEPROM.read(eepIndex++));
}
else
{
Serial.print("---------------------------");
}
Serial.print(" ");
}

We can't see your code or your error message.

1 Like

Sorry, I don't know how to place the code, but I put it with the question now

Did you just disrespect a forum member by editing a post that makes them look like they are talking nonsense?

Now post both codes inside code tags </> along with the attempt you have made, and include a FULL sinopsis of what you want the new code to do.

Please cut and paste the error messages you are seeing.

I suspect you have mismatched braces.

Please remember to use code tags when posting code

Sorry, it is my first time publishing here and my first use of this site, so I do not know the conditions or how to publish, and I did not mean to disrespect

اكتب أو ألصِق الكود هنا

#include "Adafruit_Fingerprint.h" //fingerprint library header file
#include<EEPROM.h>
#include <Adafruit_ST7735.h>
#include <Adafruit_GFX.h>
#include <Wire.h>
#include "Sodaq_DS3231.h"
#include <SPI.h>
SoftwareSerial fingerPrint(2, 3);

#define TFT_CS 10
#define TFT_RST 8
#define TFT_DC 9
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

// Option 2: use any pins but a little slower!
#define TFT_SCLK 13 // set these to be whatever pins you like!
#define TFT_MOSI 11 // set these to be whatever pins you like!
uint8_t id;
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&fingerPrint);

#define register_back 14
#define delete_ok 15
#define forward 16
#define reverse 17
#define match 5
#define indFinger 7
#define buzzer 5
#define records10 //10 for 10 user
int user1,user2,user3,user4,user5,user6,user7,user8,user9,user10;

float maxTemperature=0;
float minTemperature=200;
char charMinTemperature[10];
char charMaxTemperature[10];
char timeChar[100];
char dateChar[50];
char temperatureChar[10];

float temperature = 0;
float previousTemperature = 0;

String dateString;
int minuteNow=0;
int minutePrevious=0;

void setup ()
{
tft.initR(INITR_BLACKTAB);
tft.fillScreen(ST7735_BLACK);
Serial.begin(57600);
Wire.begin();
rtc.begin();
printText("TEMPERATURE", ST7735_GREEN,30,65,1); // Temperature Static Text
printText("MAX", ST7735_RED,18,130,1);
printText("MIN", ST7735_BLUE,95,130,1);
//setRTCTime();

}

Serial.begin(9600);
pinMode(register_back, INPUT_PULLUP);
pinMode(forward, INPUT_PULLUP);
pinMode(reverse, INPUT_PULLUP);
pinMode(delete_ok, INPUT_PULLUP);
pinMode(match, INPUT_PULLUP);
pinMode(buzzer, OUTPUT);
pinMode(indFinger, OUTPUT);
digitalWrite(buzzer, LOW);
if(digitalRead(register_back) == 0)
{
digitalWrite(buzzer, HIGH);
delay(500);
digitalWrite(buzzer, LOW);
tft.fillScreen(ST7735_BLACK);
printText("Please wait !", ST7735_GREEN,30,65,1);
printText("Downloding Data", ST7735_GREEN,30,65,1);
printText("Please wait", ST7735_GREEN,30,65,1);
printText("Downloding Data..", ST7735_GREEN,30,65,1);printText("Please wait", ST7735_GREEN,30,65,1);
printText("Downloding Data..", ST7735_GREEN,30,65,1);
Serial.println();

Serial.print("S.No. ");
for(int i=0;i<records;i++)
{
digitalWrite(buzzer, HIGH);
delay(500);
digitalWrite(buzzer, LOW);
Serial.print(" User ID");
Serial.print(i+1);
Serial.print(" ");
}
Serial.println();
int eepIndex=0;
for(int i=0;i<30;i++)
{
if(i+1<10)
Serial.print('0');
Serial.print(i+1);
Serial.print(" ");
eepIndex=(i7);
download(eepIndex);
eepIndex=(i
7)+210;
download(eepIndex);
eepIndex=(i7)+420;
download(eepIndex);
eepIndex=(i
7)+630;
download(eepIndex);
eepIndex=(i7)+840;
download(eepIndex);
eepIndex=(i
7)+1050;
download(eepIndex);
eepIndex=(i7)+1260;
download(eepIndex);
eepIndex=(i
7)+1470;
download(eepIndex);
eepIndex=(i*7)+1680;
download(eepIndex);
Serial.println();
}
}
if(digitalRead(delete_ok) == 0)
{
tft.fillScreen(ST7735_BLACK);
printText("Please Wait", ST7735_GREEN,30,65,1);
printText("Reseting.....", ST7735_GREEN,30,65,1);
for(int i=1000;i<1005;i++)
EEPROM.write(i,0);
for(int i=0;i<841;i++)
EEPROM.write(i, 0xff);
tft.fillScreen(ST7735_BLACK);
printText("System Reset", ST7735_GREEN,30,65,1);
delay(1000);
}

tft.fillScreen(ST7735_BLACK);
printText(" Fingerprint ", ST7735_GREEN,30,65,1);
printText("Attendance System", ST7735_GREEN,30,65,1);
delay(2000);
tft.fillScreen(ST7735_BLACK);

digitalWrite(buzzer, HIGH);
delay(500);
digitalWrite(buzzer, LOW);
for(int i=1000;i<1000+records;i++)
{
if(EEPROM.read(i) == 0xff)
EEPROM.write(i,0);
}

finger.begin(57600);
Serial.begin(9600);
tft.fillScreen(ST7735_BLACK);
printText("Finding Module..", ST7735_GREEN,30,65,1);
delay(2000);
if (finger.verifyPassword())
{
Serial.println("Found fingerprint sensor!");
tft.fillScreen(ST7735_BLACK);
prinText(" Module Found", ST7735_GREEN,30,65,1);
delay(2000);
}
else
{
Serial.println("Did not find fingerprint sensor :(");
tft.fillScreen(ST7735_BLACK);
prinText("Module Not Found",ST7735_GREEN,30,65,1);
ptinText("Check Connections",ST7735_GREEN,30,65,1);
while (1);
}
prinText(" Press Match to ",ST7735_GREEN,30,65,1);
prinText(" Start System",ST7735_GREEN,30,65,1);
delay(3000);

user1=EEPROM.read(1000);
user2=EEPROM.read(1001);
user3=EEPROM.read(1002);
user4=EEPROM.read(1003);
user5=EEPROM.read(1004);
tft.fillScreen(ST7735_BLACK);
digitalWrite(indFinger, HIGH);

}
uint32_t old_ts;

void loop ()
{
float temperature = rtc.getTemperature();
DateTime now = rtc.now(); //get the current date-time
uint32_t ts = now.getEpoch();

if (old_ts == 0 || old_ts != ts) {
old_ts = ts;

minuteNow = now.minute();
if(minuteNow!=minutePrevious)
{
dateString = getDayOfWeek(now.dayOfWeek())+", ";
dateString = dateString+String(now.date())+"/"+String(now.month());
dateString= dateString+"/"+ String(now.year());
minutePrevious = minuteNow;
String hours = String(now.hour());
if(now.minute()<10)
{
hours = hours+":0"+String(now.minute());
}else
{
hours = hours+":"+String(now.minute());
}

hours.toCharArray(timeChar,100);
tft.fillRect(10,0,160,65,ST7735_BLACK);
printText(timeChar, ST7735_WHITE,20,25,3);
dateString.toCharArray(dateChar,50);
printText(dateChar, ST7735_GREEN,8,5,1);

}

if(temperature != previousTemperature)
{
previousTemperature = temperature;
String temperatureString = String(temperature,1);
temperatureString.toCharArray(temperatureChar,10);
tft.fillRect(10,80,128,30,ST7735_BLACK);
printText(temperatureChar, ST7735_WHITE,10,80,3);
printText("o", ST7735_WHITE,90,75,2);
printText("C", ST7735_WHITE,105,80,3);

if(temperature>maxTemperature)
{
maxTemperature = temperature;
dtostrf(maxTemperature,5, 1, charMaxTemperature);
tft.fillRect(3,142,33,20,ST7735_BLACK);
printText(charMaxTemperature, ST7735_WHITE,3,145,1);
printText("o", ST7735_WHITE,35,140,1);
printText("C", ST7735_WHITE,41,145,1);
}
if(temperature < minTemperature)

{
minTemperature = temperature;
dtostrf(minTemperature,5, 1, charMinTemperature);
tft.fillRect(75,140,36,18,ST7735_BLACK);
printText(charMinTemperature, ST7735_WHITE,80,145,1);
printText("o", ST7735_WHITE,112,140,1);
printText("C", ST7735_WHITE,118,145,1);
}
}
}
delay(1000);
}

void setRTCTime()
{
DateTime dt(2015, 8, 27, 9, 35, 30, 4); // Year, Month, Day, Hour, Minutes, Seconds, Day of Week
rtc.setDateTime(dt); //Adjust date-time as defined 'dt' above
}void printText(char *text, uint16_t color, int x, int y,int textSize)
{
tft.setCursor(x, y);
tft.setTextColor(color);
tft.setTextSize(textSize);
tft.setTextWrap(true);
tft.print(text);
}

String getDayOfWeek(int i)
{
switch(i)
{
case 1: return "Monday";break;
case 2: return "Tuesday";break;
case 3: return "Wednesday";break;
case 4: return "Thursday";break;
case 5: return "Friday";break;
case 6: return "Saturday";break;
case 7: return "Sunday";break;
default: return "Monday";break;
}
}
int result=getFingerprintIDez();
if(result>0)
{
digitalWrite(indFinger, LOW);
digitalWrite(buzzer, HIGH);
delay(100);
digitalWrite(buzzer, LOW);
tft.fillScreen(ST7735_BLACK);
prinText("ID:", ST7735_GREEN,30,65,1);
prinText(result, ST7735_GREEN,30,65,1);
prinText("Please Wait....", ST7735_GREEN,30,65,1);
delay(1000);
attendance(result);
tft.fillScreen(ST7735_BLACK);
prinText("Attendance ", ST7735_GREEN,30,65,1);
prinText("Registered", ST7735_GREEN,30,65,1);
delay(1000);
digitalWrite(indFinger, HIGH);
return;
}
checkKeys();
delay(300);
}

// dmyyhms - 7 bytes
void attendance(int id)
{
int user=0,eepLoc=0;
if(id == 1)
{
eepLoc=0;
user=user1++;
}
else if(id == 2)
{
eepLoc=210;
user=user2++;
}
else if(id == 3)
{
eepLoc=420;
user=user3++;
}
else if(id == 4)
{
eepLoc=630;
user=user4++;
}
else if(id == 5)
{
eepLoc=0;
user=user5++;
}
else if(id == 6)
{
eepLoc=840;
user=user5++;
}
else if(id == 7)
{
eepLoc=1050;
user=user7++;
}
else if(id == 8)
{
eepLoc=1260;
user=user8++;
}
else if(id == 9)
{
eepLoc=1470;
user=user9++;
}
else if(id == 10)
{
eepLoc=1680;
user=user8++;
}
/else if(id == 5) // fifth user
{
eepLoc=840;
user=user5++;
}
/
else
return;

int eepIndex=(user*7)+eepLoc;
EEPROM.write(eepIndex++, now.hour());
EEPROM.write(eepIndex++, now.minute());
EEPROM.write(eepIndex++, now.second());
EEPROM.write(eepIndex++, now.day());
EEPROM.write(eepIndex++, now.month());
EEPROM.write(eepIndex++, now.year()>>8 );
EEPROM.write(eepIndex++, now.year());

EEPROM.write(1000,user1);
EEPROM.write(1001,user2);
EEPROM.write(1002,user3);
EEPROM.write(1003,user4);
// EEPROM.write(4,user5); // figth user
}

void checkKeys()
{
if(digitalRead(register_back) == 0)
{
tft.fillScreen(ST7735_BLACK);
prinText("Please Wait", ST7735_GREEN,30,65,1);
delay(1000);
while(digitalRead(register_back) == 0);
Enroll();
}

else if(digitalRead(delete_ok) == 0)
{
tft.fillScreen(ST7735_BLACK);
prinText("Please Wait",ST7735_GREEN,30,65,1);
delay(1000);
delet();
}
}

void Enroll()
{
int count=1;
tft.fillScreen(ST7735_BLACK);
prinText("Enter Finger ID:",ST7735_GREEN,30,65,1);

while(1)
{
prinText(count,ST7735_GREEN,30,65,1);
if(digitalRead(forward) == 0)
{
count++;
if(count>records)
count=1;
delay(500);
}

else if(digitalRead(reverse) == 0)
{
count--;
if(count<1)
count=records;
delay(500);
}
else if(digitalRead(delete_ok) == 0)
{
id=count;
getFingerprintEnroll();
for(int i=0;i<records;i++)
{
if(EEPROM.read(i) != 0xff)
{
EEPROM.write(i, id);
break;
}
}
return;
}

else if(digitalRead(register_back) == 0)
{
return;
}
}
}

void delet()
{
int count=1;
tft.fillScreen(ST7735_BLACK);
prinText("Enter Finger ID", ST7735_GREEN,30,65,1);

while(1)
{

prinText(count,ST7735_GREEN,30,65,1);
if(digitalRead(forward) == 0)
{
count++;
if(count>records)
count=1;
delay(500);
}

else if(digitalRead(reverse) == 0)
{
count--;
if(count<1)
count=records;
delay(500);
}
else if(digitalRead(delete_ok) == 0)
{
id=count;
deleteFingerprint(id);
for(int i=0;i<records;i++)
{
if(EEPROM.read(i) == id)
{
EEPROM.write(i, 0xff);
break;
}
}
return;
}

else if(digitalRead(register_back) == 0)
{
return;
}
}
}

uint8_t getFingerprintEnroll()
{
int p = -1;
tft.fillScreen(ST7735_BLACK);
prinText("finger ID:",ST7735_GREEN,30,65,1);
prinText(id,ST7735_GREEN,30,65,1);
prinText("Place Finger",ST7735_GREEN,30,65,1);
delay(2000);
while (p != FINGERPRINT_OK)
{
p = finger.getImage();
switch (p)
{
case FINGERPRINT_OK:
Serial.println("Image taken");
tft.fillScreen(ST7735_BLACK);
prinText("Image taken",ST7735_GREEN,30,65,1);
break;
case FINGERPRINT_NOFINGER:
Serial.println("No Finger");
tft.fillScreen(ST7735_BLACK);
prinText("No Finger Found",ST7735_GREEN,30,65,1);
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
tft.fillScreen(ST7735_BLACK);
prinText("Comm Error",ST7735_GREEN,30,65,1);
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
tft.fillScreen(ST7735_BLACK);
prinText("Imaging Error",ST7735_GREEN,30,65,1);
break;
default:
Serial.println("Unknown error");
tft.fillScreen(ST7735_BLACK);
prinText("Unknown Error",ST7735_GREEN,30,65,1);
break;
}
}

// OK success!

p = finger.image2Tz(1);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
tft.fillScreen(ST7735_BLACK);
prinText("Image converted",ST7735_GREEN,30,65,1);
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
tft.fillScreen(ST7735_BLACK);
prinText("Image too messy",ST7735_GREEN,30,65,1);
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
tft.fillScreen(ST7735_BLACK);
prinText("Comm Error",ST7735_GREEN,30,65,1);
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
tft.fillScreen(ST7735_BLACK);
prinText("Feature Not Found",ST7735_GREEN,30,65,1);
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
tft.fillScreen(ST7735_BLACK);
prinText("Feature Not Found",ST7735_GREEN,30,65,1);
return p;
default:
Serial.println("Unknown error");
tft.fillScreen(ST7735_BLACK);
prinText("Unknown Error",ST7735_GREEN,30,65,1);
return p;
}

Serial.println("Remove finger");
tft.fillScreen(ST7735_BLACK);
prinText("Remove Finger",ST7735_GREEN,30,65,1);
delay(2000);
p = 0;
while (p != FINGERPRINT_NOFINGER) {
p = finger.getImage();
}
Serial.print("ID "); Serial.println(id);
p = -1;
Serial.println("Place same finger again");
tft.fillScreen(ST7735_BLACK);
prinText("Place Finger",ST7735_GREEN,30,65,1);
prinText(" Again",ST7735_GREEN,30,65,1);
while (p != FINGERPRINT_OK) {
p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.print(".");
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
return;
}
}

// OK success!

p = finger.image2Tz(2);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}

// OK converted!
Serial.print("Creating model for #"); Serial.println(id);

p = finger.createModel();
if (p == FINGERPRINT_OK) {
Serial.println("Prints matched!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_ENROLLMISMATCH) {
Serial.println("Fingerprints did not match");
return p;
} else {
Serial.println("Unknown error");
return p;
}

Serial.print("ID "); Serial.println(id);
p = finger.storeModel(id);
if (p == FINGERPRINT_OK) {
Serial.println("Stored!");
tft.fillScreen(ST7735_BLACK);
prinText(" Finger Stored!",ST7735_GREEN,30,65,1);
delay(2000);
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_BADLOCATION) {
Serial.println("Could not store in that location");
return p;
} else if (p == FINGERPRINT_FLASHERR) {
Serial.println("Error writing to flash");
return p;
}
else {
Serial.println("Unknown error");
return p;
}
}

int getFingerprintIDez()
{
uint8_t p = finger.getImage();

if (p != FINGERPRINT_OK)
return -1;

p = finger.image2Tz();
if (p != FINGERPRINT_OK)
return -1;

p = finger.fingerFastSearch();
if (p != FINGERPRINT_OK)
{
tft.fillScreen(ST7735_BLACK);
prinText("Finger Not Found",ST7735_GREEN,30,65,1);
prinText("Try Later",ST7735_GREEN,30,65,1);
delay(2000);
return -1;
}
// found a match!
Serial.print("Found ID #");
Serial.print(finger.fingerID);
return finger.fingerID;
}

uint8_t deleteFingerprint(uint8_t id)
{
uint8_t p = -1;
tft.fillScreen(ST7735_BLACK);
prinText("Please wait",ST7735_GREEN,30,65,1);
p = finger.deleteModel(id);
if (p == FINGERPRINT_OK)
{
Serial.println("Deleted!");
tft.fillScreen(ST7735_BLACK);
prinText("Finger Deleted",ST7735_GREEN,30,65,1);
prinText("Successfully",ST7735_GREEN,30,65,1);
delay(1000);
}

else
{
Serial.print("Something Wrong");
tft.fillScreen(ST7735_BLACK);
prinText("Something Wrong",ST7735_GREEN,30,65,1);
prinText("Try Again Later",ST7735_GREEN,30,65,1);
delay(2000);
return p;
}
}

void download(int eepIndex)
{

if(EEPROM.read(eepIndex) != 0xff)
{
Serial.print("T->");
if(EEPROM.read(eepIndex)<300)
Serial.print('0');
Serial.print(EEPROM.read(eepIndex++));
Serial.print(':');
if(EEPROM.read(eepIndex)<300)
Serial.print('0');
Serial.print(EEPROM.read(eepIndex++));
Serial.print(':');
if(EEPROM.read(eepIndex)<300)
Serial.print('0');
Serial.print(EEPROM.read(eepIndex++));
Serial.print('/');
Serial.print(EEPROM.read(eepIndex++)<<8 | EEPROM.read(eepIndex++));
}
else
{
Serial.print("---------------------------");
}
Serial.print(" ");
}

Look, no offence taken, but please just post the error messages and the code, both in code tags.
(Use the "</>" control on the editor toolbar)