I have connected up an RFID reader to an Arduino . When the RFID reader is activated it sends the data to my arduino which can send it to the serial monitor on my PC via USB. However, I am trying to send the RFID data via the TX pin on my Arduino to a microbit extension.
The TX pin on my Arduino Uno is Connected to an RX pin on an "Octopus:bit" and both grounds are connected. However, the TX pin is not sending the data.
Can someone please help
Code I am using:
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
void setup()
{
Serial.begin(9600); // Initiate a serial communication
SPI.begin(); // Initiate SPI bus
mfrc522.PCD_Init(); // Initiate MFRC522
Serial.println("Approximate your card to the reader...");
Serial.println();
}
void loop()
{
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
//Show UID on serial monitor
Serial.print("UID tag :");
String content= "";
byte letter;
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte < 0x10 ? " 0" : " ");
_ Serial.print(mfrc522.uid.uidByte*, HEX);_
_ content.concat(String(mfrc522.uid.uidByte < 0x10 ? " 0" : " "));
content.concat(String(mfrc522.uid.uidByte, HEX));
}
Serial.println();
Serial.print("Message : ");
content.toUpperCase();
if (content.substring(1) == "51 67 3E 20") //change here the UID of the card/cards that you want to give access*
* {
Serial.println("Book scanned");
Serial.println();
delay(3000);
}*_
else {
* Serial.println(" Access denied");*
* delay(3000);*
* }*
}