I have tried to write a software that transmits and it receives, by serial, in the same card of arduino one.
I have connected the Pin RXpin 4 (first serial channel) with TXpin1 5 (second serial channel) and TXpin 3 (first serial channel) with RXpin1 6 (second serial channel)
Obviously doesn’t work!
I.E.
#include <SoftwareSerial.h>
#define RXpin 4 // first serial channel
#define TXpin 3 // first serial channel
#define RXpin1 6 // second serial channel
#define TXpin1 5 // second serial channel
SoftwareSerial myPort = SoftwareSerial(RXpin, TXpin);
SoftwareSerial myPort1 = SoftwareSerial(RXpin1, TXpin1);
void setup()
{
delay(1000);
Serial.begin(9600);
Serial.println("Hello world ");
pinMode(RXpin, INPUT);
pinMode(TXpin, OUTPUT);
pinMode(RXpin1, INPUT);
pinMode(TXpin1, OUTPUT);
myPort.begin(600);
myPort1.begin(600);
}
void loop()
{
delay(2000);
char c;
myPort.println(“A”);
// check if there are received characters
while (myPort1.available() > 0) {
c = myPort1.read();
Serial.println(c);
delay(2000);
}
}
thanks of the support and you excuse for mine “English”.