سلام
کد:
/*
# be name khoda
# Example code RDM6300 - RFID
# Company    : AftabRayaneh
# Website    : http://shop.aftabrayaneh.com
# Developer  : Reza Najafi
# Date       : 22.10.2013
# Version    : 1.0

PIN  DESCRIPTION      ARDUINO PIN    RDM6300 PIN
1    GND              GND            P3 - 1
2    VCC (3.5-12V)    VCC            P3 - 2
3    TX DATA          D2             P1 - 1
*/

#include <SoftwareSerial.h>
SoftwareSerial RFID(2, 3);
String rfidCode;
char c;

void setup()
{
  Serial.begin(9600);
  RFID.begin(9600);
  Serial.println("Starting RFID ...");
}

void loop()
{
  while(RFID.available()>0){
    delay(5);
    c=RFID.read();
    rfidCode += c;
  }
  if(rfidCode.length()>10) Check();
  rfidCode="";
}

void Check()
{
  rfidCode=rfidCode.substring(1,11);
  Serial.println("RFID Code : "+rfidCode);
}