Seeedstudio rfid problem with pro mini

To start I hope I am posting in the correct area.

HI, I am having a problem with my sparkfun pro mini 3.3v 8mhz arduino. It doesn’t read correctly from my seeedstudio rfid. I get scrambled letters returned when it should display the RFID card’s 12 char code. It works perfectly fine with my UNO but doesn’t want to work with the pro mini. I have messed with the baud rate but i really don’t know what i am doing with that. Here is the code i mostly borrowed if it helps.

#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3

//create a Serial object RFID
SoftwareSerial RFID = SoftwareSerial(rxPin, txPin);
char code[20];

int f = 0;
int val = 0;
int bytesread = 0;

char Red[]    = "45005311D8DF";

int ledCnt = 5;
int LED[] = {13, 9, 7, 5};

void setup()
{
  Serial.begin(9600); //open serial hardware
  RFID.begin(9600); //open serial software
  
  pinMode(rxPin, INPUT); //set pin on arduino for receiving RFID data
  pinMode(txPin, OUTPUT); //this is not important

  pinMode(12, OUTPUT);
  pinMode(11,OUTPUT);
}

void loop()
{
  val = 0;
  bytesread = 0;

  while(bytesread < 12)
  {
    // read 12 digit code
    val = RFID.read();
    if(val == 3)
    { // if header or stop bytes before the 10 digit reading
	break; // stop reading
    }
    
    if(val != 2)
    {
	code[bytesread] = val; // add the digit
	bytesread++; // ready to read next digit
	code[bytesread] = '\0'; // add the NULL
    }
  }
  
  if(bytesread >= 12)
  { // if 12 digit read is complete
    Serial.print("Tag: [");
    for(int i=0; i<bytesread; i++)
    {
	Serial.print(code[i]);
    }
    Serial.println("]"); //print the whole 13 bytes
    int tag = FindValidTag(code);
    Serial.print("Tag number: ");
    Serial.println(tag);

    for(int i=0; i<ledCnt; i++)
	digitalWrite(11, LOW);
        digitalWrite(12, LOW);
    if(tag > 0 && tag <= ledCnt)
	do
      {
        digitalWrite(11, HIGH);
        delay(200);
        f++;  // check the sensors

       } while (f < 2);
       digitalWrite(11, LOW);
       f=0;
       delay(10000);
       do
      {
        digitalWrite(12, HIGH);
        delay(200);
        f++;  // check the sensors

       } while (f < 2);
       digitalWrite(12, LOW);

  }
}
int FindValidTag(char *code)
{
  if(strcmp(code, Red) == 0)
    return 1;
  else
    return 0;
}

thanks!

Try setting the software serial rate at twice what it should be as the clock is only half what it should be.

Grumpy_Mike:
Try setting the software serial rate at twice what it should be as the clock is only half what it should be.

i did try that and it didn’t help.

got it to read correctly using the NewSoftSerial library just need to rewrite my whole code now using the NewSoftSerial stuff

ty for helping