Send sport data to uart

Hi, I am sending a stream from SPORT (1 pin) on radiomaster tx12 to arduino nano and tgen, from arduino sending it from uart. The problem is that data which is sent from uart differs from data which is received directly from sport. I think it is somehow converted by default. How to make sure tgat a stream whuch is received from sport remains tge same after being sending from arduino uart. Thank you

Welcome to the forum

More details please

Start by explaining what SPORT is

Post your full sketch, using code tags when you do and a schematic of your project showing how the devices are connected and powered

1 Like

Sport is a pin on radiomaster tx12.

Silly me for not knowing that

What data comes out of the port and what format is it in ?
Is it a serial port ?

1 Like

Please post a link to the TX12 data sheet, giving the details of the serial protocol and voltage levels. Did you connect the Arduino and TX12 grounds?

Also state which Arduino you have. There are half a dozen different "nano" models.

1 Like
#include <SoftwareSerial.h>
#include <Streaming.h>

SoftwareSerial mySerial (10, 10, true);

int incomingByte = 0;

void setup () {
  Serial.begin (115200);
  mySerial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Native USB only
  }
}

void loop () {
  available = mySerial.available();

  pinMode(10, INPUT);
  delay (200);
  while (mySerial.available()) {
    incomingByte = mySerial.read();
    Serial.print(incomingByte );
  }

  

  available = Serial.available();
  pinMode(10, OUTPUT);
  delay (200);
  while (Serial.available()) {   
    mySerial << Serial.read();
  }


}

Sport:
serial protocol, so it can be used with an UART3.3V levelinverted, i.e. high and low level are swappedsingle wire, meaning that both tansmit and receive are using the same wire, so they cannot talk at the same time (half duplex)

Ground for arduino nano and radimaster tx12 is shared

Version is atmega328p old bootloader

SoftwareSerial does not work reliably at 115200 Baud. Maximum is about 38400, if you are lucky, and 3.3V signals can be a problem with a 5V Arduino.

Use a 3.3V Arduino with an extra hardware serial port instead.

1 Like

Thank you, I will try

Hey, you are in luck. There's someone on r/aduino with exactly the same problem! Perhaps the two of you can get together and figure out a solution. Good luck!

1 Like

May be the same person.

1 Like

It is me😁 no good luck))))))

Burroughs Corp. had a similar serial connection in the ancient 1970's. It can ONLY work in situations where one end of the connection is a master and can have logical control of the sending and receiving timing. The master will send a request and the slave will respond. A slave cannot ever initiate the exchange. Is this similar to your protocol?

Not sure. Sport is a smart port. But I am a beginner and not even able to find official documentatjon to understand how it behaves

If ArduPilot is communicating with the RC radio using that protocol, post on their forum. Those people would know where to find the documentation, and point you to working example wiring and code.

1 Like

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