Good evening, I am Italian, I tried to write this question of mine in the Italian part of the Forum but no one answered me and was able to help me, so I try to ask here. I hope not to break the forum rules. Thanks
Good evening to all, I need to connect two devices that communicate via RS232. The problem is that I have to do it over a distance of about 2 km and I can't "lay" cables. The idea is to use two Arduino with LoRa module, can it be feasible? I enclose a sketch to make me understand more (or at least I hope ??? ) Thanks, good evening
Hi, yes I bought two TTL-RS232 converters, two Arduino UNO and two LoRa modules (I don't know if I can put the link of the model ..).
Now I try to write the code and then put it on the forum to ask for help. Thanks
Goodmorning everyone. I tried inserting this very simple code that I attach:
#include <SoftwareSerial.h>
SoftwareSerial BusSeriale(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 native USB port only
}
// set the data rate for the SoftwareSerial port
BusSeriale.begin(9600);
}
void loop() { // run over and over
if (BusSeriale.available()) {
Serial.write(BusSeriale.read());
}
if (Serial.available()) {
BusSeriale.write(Serial.read());
}
}
If i use two PCs, connected to the two 232 / TTL converters (then using the Teraterm Software) I can send messages, letters, characters, texts, files etc etc .. sometimes work ... But if I connect devices with RS 232 and a PC does not seem to work.