Toll-Free Customer Support 24/7

RFID Reader-TTL

/*


 Receives from software serial, sends to hardware serial.

 The circuit:
 
 * RFID TX is digital pin 2 (connect to RX of other device)
 * 5v to 5v
 * Gnd to Gnd
 



 */
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("---RFID Reader---");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);

}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());

}

Back to top