USING SOFTWARESERIAL TO CONNECT ARDUINO TO RFID READER

Hi guys i have a problem here

i have made all necessary connections right (double checked)
my rfid reader has an RS 232 which i connected through a max232 circuit and connected its outputs to TX and RX of the arduino the problem is that i can receive anything from my arduino in serial monitor here is my code.

am using an rfid reader http://uconnect.com.tw/ActiveRFIDReader.html

#include <SoftwareSerial.h>

#define rxPin 0
#define txPin 1
SoftwareSerial softSerial = SoftwareSerial(rxPin, txPin);
char data[40];

void setup() {

Serial.begin(9600); // set up Serial library at 9600 bps
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
softSerial.begin(9600);

}

void loop() // run over and over again
{
while (Serial.available()==0);

char data = Serial.read();

Serial.println(data);

}

thanx alot
John

#include <SoftwareSerial.h>

#define rxPin 0
#define txPin 1
SoftwareSerial softSerial =  SoftwareSerial(rxPin, txPin);

Dumb! You can not do SoftwareSerial on the hardware serial pins. It makes no sense.

am confused can you explain

Each serial connection can only have one device at each end. Given that you are using the hardware serial pins (0, 1) for the serial/USB connection to the PC, they are not available for you to use to connect to your max232 circuit. You need to use two different pins (and SoftwareSerial) to connect to that.

awesome that explains a lot let me try to change tx and rx pins to digital pin 10 and 11

made a few change but still no data from the RFID (the serial monitor is empty)

#include <SoftwareSerial.h>

#define rxPin 10
#define txPin 11
SoftwareSerial rfid = SoftwareSerial(rxPin, txPin);
char data[400];

void setup() {

// set up Serial library at 9600 bps
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
rfid.begin(9600);

}

void loop() // run over and over again
{
while (rfid.available()==0);

char data = rfid.read();

Serial.println(data);

}

// set up Serial library at 9600 bps

Comment without code.

i have changed the tx and rx, i also included serial write , now i get a blank serial monitor with the tx blinking on the arduino but nothing is displayed on the monitor.

#include <SoftwareSerial.h>

#define rxPin 10
#define txPin 11
SoftwareSerial rfid = SoftwareSerial(rxPin, txPin);
char data[400];

void setup() {

Serial.begin(9600); // set up Serial library at 9600 bps

rfid.begin(9600);

}

void loop() // run over and over again
{
rfid.listen();
while (rfid.available()>0){

char data = rfid.read();
Serial.write(data);
};

delay(500);

Serial.println(data);

}

void setup()  {
   
    Serial.begin(9600);           // set up Serial library at 9600 bps
 
  rfid.begin(9600);
  Serial.println ("Ready");
}

(note use of code tags)

Hi guys i have a problem here

i have made all necessary connections right (double checked)
my rfid reader has an RS 232 which i connected through a max232 circuit and connected its outputs to TX and RX of the arduino the problem is that i cant receivedata from the rfid

am using an rfid reader http://uconnect.com.tw/ActiveRFIDReader.html

#include <SoftwareSerial.h>

#define rxPin 10
#define txPin 11
SoftwareSerial rfid = SoftwareSerial(rxPin, txPin);
char data[400];

void setup() {

Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println (‘Ready’);
rfid.begin(9600);

}

void loop() // run over and over again
{
rfid.listen();
while (rfid.available()>0){

char data = rfid.read();
Serial.write(data);

};

delay(500);
if(rfid.available()>0);
{ // if 10 digit read is complete
Serial.print(“TAG code is:”); // possibly a good TAG
Serial.println(data);
}

}
//END

all i get is this in the serial monitor is
TAG code is:
TAG code is:
TAG code is:
TAG code is:
TAG code is:
TAG code is:
TAG code is:
TAG code is:
thanks alot in advance

tags, please.

What is the reason for this
if(rfid.available()>0); ?

my rfid reader has an RS 232 which i connected through a max232 circuit and connected its outputs to TX and RX of the arduino

Well, nothing will happen until you connect the reader to pins 10 and 11 instead of RX and TX.

if(rfid.available()>0); not necessary i have removed it but still no change in the serial monitor

the rfid reader connected through max 232 to pin 10 and 11 (for rx and tx respectively) but still no data in serial monitor

still no data in serial monitor

 Serial.println ('Ready');

Really?

sorry that was
Serial.println ("Ready");

but it just a statement no effect on outcome

So, you don't even see "Ready" in the serial monitor?