Pages: [1]   Go Down
Author Topic: rs232 rfid reader to arduino uno  (Read 1756 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The output of my RFID reader is rs232 and im currently using a rs232-ttl converter to connect it to my arduino MCU.( I currently cant get any output . Im using a simple code where the LED will blink and it will print "receive" on the serial monitor when there is data coming in. (codes shown below). when i scan the card on the RFID reader, the LED on the arduino wont blink and when i open the serial monitor, i wont get the message "received". Do i have to initialize the RFID reader or some sort? or am i connecting it wronly?  The TXD from the rs232-ttl is connected to pin 2 while the RXD from the rs232-ttl device is connected to pin 3 of the arduino ( i have tried connecting them in the other fashion) , the ground and vcc are connected to the arduino accordingly as well.
The RFID im using is this one:

Thanks ,

#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3
#define ledPin 13

// set up a new serial port
SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);

void setup()  {
  // define pin modes for tx, rx, led pins:
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  // set the data rate for the SoftwareSerial port

void loop() {
   if (Serial.available() > 0) {
  // listen for new serial coming in:
  char someChar =;

   Serial.print("received: ");
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off

New Jersey
Offline Offline
Faraday Member
Karma: 72
Posts: 3763
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not that this is the issue, but you'll need a serial.begin in setup as well.

Pages: [1]   Go Up
Jump to: