Storing and using RFIDs

hello guys
i am working on a project that scans an rfid tag and then displays a certain value if the tags rfid matches with the stored values of rfid. so far i am not successful please tell me what’s wrong with my code or suggest me some alternative codes or techniques to do it.
this is the code i am useing
int x=0,y=0;
int count1=0/rfid<----------------------
String cpos[12];
void setup()
{
Serial.begin(9600); // put your setup code here, to run once:
Serial3.begin(9600);
}

void loop()
{
if(Serial3.available())
{ Serial.print(“Line AA”);
RFread:count1=0;
while(Serial3.available()&& count1<12)
{
cpos[count1]=Serial3.read();
count1++;// put your main code here, to run repeatedly:
delay(5);
}
delay(500);
Serial.println(cpos[12]);

if(cpos=='27001308231F ')
{x=1,y=1;
Serial.print(“1,1”);
}
else if(cpos=='270012A752C0 ')
{ x=2,y=1;
Serial.print(“2,1”);
}
else if(cpos=='27001309E3DE ')
{ x=3,y=1;
Serial.print(“3,1”);
}
else if(cpos=='270012E1AB7F ')
{ x=4,y=1;
Serial.print(“4,1”);
}

else if(cpos=='270012A549D9 ')
{ x=1,y=2;
Serial.print(“1,2”);
}

else
{Serial.print(“got RFread”);
goto RFread;
}
}
}

 if(cpos=='27001308231F')

Single quotes are used round single characters. Can you see a problem here ?

There also appear to be some strange characters at the end of the values that you are comparing with. They show up when the code you posted is copied into the IDE

UKHeliBob:

 if(cpos=='27001308231F')

Single quotes are used round single characters. Can you see a problem here ?

There also appear to be some strange characters at the end of the values that you are comparing with. They show up when the code you posted is copied into the IDE

how can i correct it

i changed my codes. its still not working.
int x=0,y=0;
int count1=0; //rfid<----------------------
char cpos[12];

void setup()
{
Serial.begin(9600); // put your setup code here, to run once:
Serial3.begin(9600);
}

void loop()
{
if(Serial3.available())
{ Serial.println(“Line AA”);
RFread:count1=0;
while(Serial3.available()&& count1<12)
{
cpos[count1]=Serial3.read();
count1++;// put your main code here, to run repeatedly:
delay(5);
//Serial.println(count1);
}
delay(500);
Serial.println(cpos);

if(cpos=="27001308231F ")
{x=1,y=1;
Serial.print(“1,1”);
}
else if(cpos=="270012A752C0 ")
{ x=2,y=1;
Serial.print(“2,1”);
}
else if(cpos=="27001309E3DE ")
{ x=3,y=1;
Serial.print(“3,1”);
}
else if(cpos==“270012E1AB7F”)
{ x=4,y=1;
Serial.print(“4,1”);
}

else if(cpos=="270012A549D9 ")
{ x=1,y=2;
Serial.print(“1,2”);
}

else
{Serial.println(“got RFread”);
goto RFread;
}

}
}

output

Line AA
270012A752C0
got RFread
270012A752C0
got RFread
270012A752C0
got RFread
270012A752C0
got RFread
270012A752C0
got RFread
270012A752C0
got RFread
270012A752C0
got RFread
270012A752C0
got RFread

cmon guys please

i changed my codes. its still not working

A number of things are wrong

1 - you cannot compare C strings using == you need to use strcmp()

2 - the cpos array is an array of chars, not a C string because you have not added a terminating ‘\0’

3 - your RFID codes have a very odd trailing character. Copy your code from here back to the IDE to see them. In the IDE they are 13 characters long

4 - the use of the goto command is deprecated and is not necessary. The loop() function does what its name implies, ie it loops, so use that to read the ID characters from Serial