Hi everyone. I am work on a project. When the rfid card is read, send the arduino serial monitor to a value of "1". I do this with 1 arduino, on 1 computer. Now I want to send a signal to 2 computers with 1 rfid. I use arduino uno. I don't have an Arduino Due. I think i am must use 2 arduino. I know I can do this by connecting the arduino pins "rx", "tx" but I don't know how to write the code. my code is here:
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
int mystr=1;
String UID = "CA C7 44 B4";
String UID1 = "1A FE 22 BE";
byte lock = 0;
String UID2 = "6A 73 27 B4";
MFRC522 rfid(SS_PIN, RST_PIN);
void setup()
{
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
}
void loop()
{
if ( ! rfid.PICC_IsNewCardPresent())
return;
if ( ! rfid.PICC_ReadCardSerial())
return;
String ID = "";
for (byte i = 0; i < rfid.uid.size; i++) {
ID.concat(String(rfid.uid.uidByte[i] < 0x10 ? " 0" : " "));
ID.concat(String(rfid.uid.uidByte[i], HEX));
delay(300);
}
ID.toUpperCase();
if (ID.substring(1) == UID ||ID.substring(1) == UID1 ||ID.substring(1) == UID2 ) {
Serial.println(1);
delay(6000);
}
else {
Serial.println("Yanlish kart");
}
}
important part is "serialPrintln(1)". İ dont know what i write this part.
i do repeat i want when rfid == True then Serial.println(1) but i must send two arduino's serial monitor in different computer. please help me.