I have a RDM6300 RFID module which I am trying to connect to an ESP8266 by using rdm6300.h library.
I had it all up an running all along with other components but we had connected to the ESP8266 but we had to move from the breadboard to an actual wired setup. Everything kept on working except for the RFID reader. The way I used to do it was by making a reference to this approach (more or less):
#include <rdm6300.h>
#define RDM6300_RX_PIN 4
#define READ_LED_PIN 13
Rdm6300 rdm6300;
void setup()
{
Serial.begin(115200);
pinMode(READ_LED_PIN, OUTPUT);
digitalWrite(READ_LED_PIN, LOW);
rdm6300.begin(RDM6300_RX_PIN);
Serial.println("\nPlace RFID tag near the rdm6300...");
}
void loop()
{
/* if non-zero tag_id, update() returns true- a new tag is near! */
if (rdm6300.update())
Serial.println(rdm6300.get_tag_id(), HEX);
digitalWrite(READ_LED_PIN, rdm6300.is_tag_near());
delay(10);
}
but now, after the re-arrangement it just stopped reading tags. What I did was to disconnect everything from the ESP and leave only the RDM6300 connected to it with the sample code. Unfortunately, it doesn't seem to detect any tags.
In order to test if the components are failing for some reason, I decided to test it by using SoftwareSerial.h library on it like this:
#include <SoftwareSerial.h>
SoftwareSerial RFID(2, 3); // RX and TX
int i;
void setup()
{
RFID.begin(9600); // start serial to RFID reader
Serial.begin(9600); // start serial to PC
}
void loop()
{
if (RFID.available() > 0)
{
i = RFID.read();
Serial.print(i, DEC);
Serial.print(" ");
}
}
and it worked perfectly fine. I was able to read the payload coming from the chip:
2 30 31 30 46 33 46 38 44 39 31 32 44 3
But, since I don't want to implement everything related to decoding this serial stream I decided to ask for your opinion what could be wrong here. It used to work without any problem but now it doesn't.
There is something interesting which I also noticed. When I run the first code snipped and change the ESP8266 pin used from 4 to 16(D0) and I upload it, once I move the tag close to the antenna the hardware light related to this pin starts flashing and when I bring the tag back (away from the antenna) it stops flashing.
This makes me thing that on a hardware level everything is fine but some software issues are happening.