Friends I am in need of help with code for the FM-505 UHF RFID reader. I'm failing to implement all the code. Could anyone help me or point me to a site with examples? Need, read and write on RFID TAG.
I took part of a code here on this forum and tried to implement it, but it didn't work well
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
uint8_t tagEPC2[] = { 0x0A, 0x51, 0x0D }; // Display tag EPC ID
// LF R 1 , 2 , 6 CR
// Not sure on this one
byte readmemepc[] = { 0x0A, 0x52, 0x31, 0x2C, 0x32, 0x2C, 0x36, 0x0D }; // Read tag memory data (EPC)
// Read EPC Address 2, 3 words
byte B[] = { 0x0A, 0x52, 0x31, 0x2C, 0x32, 0x2C, 0x33, 0x0D }; // Read tag memory data (EPC)
// Write envelope number to EPC
byte C[] = { 0x0A, 0x57, 0x31, 0x2C, 0x32, 0x2C, 0x33, 0x2C, 0x31, 0x37, 0x36, 0x30, 0x35, 0x33, 0x30, 0x30, 0x32, 0x30, 0x30, 0x30, 0x0D }; //
// Multi EPC
byte D[] = { 0x0A, 0x55, 0x0D }; //
// Single EPC [Q]
byte E[] = { 0x0A, 0x51, 0x0D }; //
void setup() {
Serial.begin(9600);
// set the baud rate for the SoftwareSerial port
mySerial.begin(38400);
mySerial.println("Q"); //read signal sent to FM-503 RFID reader.
}
void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
}