#include <SoftwareSerial.h>
const int RFID_rx = D4;
SoftwareSerial rfid_Serial(RFID_rx, -1); // RX pin is D4, TX pin is not used (-1)
void setup() {
Serial.begin(9600);
rfid_Serial.begin(9600);
void loop() {
// RFID
if (rfid_Serial.available()) {
// Read the incoming data
int incomingByte = rfid_Serial.read();
// Print the received byte in hexadecimal format
Serial.print("Received: 0x");
Serial.printf("%02X", incomingByte);
Serial.println();
}
// RFID
}
Yes, there is and it shows exactly what the UART message is. And it is multiple bytes long, but your program only reads and processes a SINGLE byte/character. Why do you not read the entire message before doing any processing of the data?
Can you measure the voltage on the "UART" pin when the device is idle?
I can't tell for sure, but it looks somewhat like there is an rs232 converter chip on that board, in which case it won't work directly with SoftwareSerial.