Hello !
I`m working on a RFID database project , and I am having problems with reading the cards .
I have 4 separate cards that i register in the database but all the cards are read the same .
The reader also shows strange symbols instead of numbers for the cards ex : ÿÿÿÿÿÿÿÿÿÿÿ
I have set the baudrate in the code and the monitor to 9600 and have tried other rates but still getting random characters instead of reading the cards .
I`m using for this project an Arduino Uno v3 with a ID-12LA reader .
void RegisterCard()
{
// Read a card
for (int rs = 0; rs < 6; rs++)
{
rfid_data[rs] = '0';
}
rfid_data[10] = '\0';
digitalWrite(6, LOW);
delay(500);
do
{
delay(200);
} while (RFID.available() <= 0);
digitalWrite(6, HIGH);
delay(500);
Serial.println("Citeste card");
rfid_data[0] = RFID.read();
if (int(rfid_data[0]) == 10)
{
for (i = 0; i < 7; i++)
{
rfid_data[i] = RFID.read();
}
rfid_data[10] = '\0';
}
Code for reading a card