How can i send one signal to two computer?

Hi everyone i work on a project. I need when rfid==true then serial.println(1). I receive this value from visualstudio python with pyserial library. when value is = 1, i play a video with opencv.
'''
#include "pitches.h"
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
static const int buzzerPin = 2;
String UID = "CA C7 44 B4";
String UID1 = "A 6E 7F AD";
byte lock = 0;
String UID2 = "6A 73 27 B4";

MFRC522 rfid(SS_PIN, RST_PIN);
// Melody notes

void beep() {
tone(buzzerPin, 400, 300);
}
void setup()
{
Serial.begin(9600);

pinMode(buzzerPin, OUTPUT);

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);
beep();
delay(6000);

}
else {
Serial.println("Yanlish kart");
beep();
delay(50);
beep();

}
}
'''

my code is here. My code work properly and my video play properly it is okey. but now i want develop my project. i want use two computer the video's one side this computer other side is other computer. I dont want you help me in python code. I want just when rfid is true send signal(1) to two computer at the same time and video play at the same time. How connect other computer& how send the same signal other computer?

Hello

Which board are you using ? Some boards have multiple Serial ports, else you can use the SoftwareSerial library

( And for formatting your code correctly, it's ``` not ''' )

i use arduino uno.

If I understand correctly, you want to send the serial data output from one Arduino Uno to two PCs. That serial data is received by some Python application running on each of these PCs.

The Arduino output (Tx) can be connected to multiple inputs, that is, just wire the Arduino Tx and Gnd to each of the Rx and Gnd pins on the PC adapter.

You would require multiple serial input ports on the Arduino if it were receiving serial data from the PCs, but your Arduino code doesn't require that.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.