Can anyone tell me whats the problem with this code?
Code: Select all
#include <SoftwareSerial.h>
HardwareSerial Serial1(USART1); // or HardWareSerial Serial2 (PA3, PA2);
SoftwareSerial mySerial(PA3, PA2, true); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial1.begin(57600);
while (!Serial1) {
; // wait for serial port to connect. Needed for native USB port only
}
delay(2000);
Serial1.println("Start");
mySerial.begin(57600);
}
void loop() { // run over and over
if (mySerial.available()) {
Serial1.write(mySerial.read());
}
}
Data is coming in through the attached device.
I try to read data from a FrSky S.Port (receiver). And using the SoftwareSerial has the benefit of inversion.
But so far it will not work

Dominik