Leitor RFID 125KHz RDM6300

Help me!

The program below reads the serial port until a card is placed near the antenna. When this happens, the tag ID is sent to the serial monitor.

#include <SoftwareSerial.h>
#include <RDM6300.h>

//Inicializa a serial nos pinos 2 (RX) e 3 (TX)
SoftwareSerial RFID(2, 3);

int Led = 13;
uint8_t Payload[6]; // used for read comparisons

RDM6300 RDM6300(Payload);

void setup()
{
pinMode(Led, OUTPUT);
//Inicializa a serial para o leitor RDM6300
RFID.begin(9600);
//Inicializa a serial para comunicacao com o PC
Serial.begin(9600);
//Informacoes iniciais
Serial.println("Leitor RFID RDM6300
");
}

void loop()
{
//Aguarda a aproximacao da tag RFID
while (RFID.available() > 0)
{
digitalWrite(Led, HIGH);
uint8_t c = RFID.read();
if (RDM6300.decode(c))
{
Serial.print("ID TAG: ");
//Mostra os dados no serial monitor
for (int i = 0; i < 5; i++) {
Serial.print(Payload*, HEX);*

  • Serial.print(" ");*
  • }*
  • Serial.println();*
  • }*
  • }*
  • digitalWrite(Led, LOW);*
  • delay(100);*
    }
    How do I make comparisons with a tag ID, for example:
    if (TAG ID == “29 0 BF D2 53”) // TAG ID 1
    {
    Serial.println (“Authorized Access!”);
    Serial.println ();

start by reading the forum rule and please correct your post above and add code tags around your code:
[code]`` [color=blue]// your code is here[/color] ``[/code].

It should look like this:// your code is here
(Also press ctrl-T (PC) or cmd-T (Mac) in the IDE before copying to indent your code properly)


to your question, you receive the bytes in the payload array, so you could use a memcmp() to compare the payload with a constant array you would have defined at the top of your codeconst uint8_t goodPayload[] = {0x29,0x0, 0xBF, 0xD2, 0x53};