Single wire asynchronous serial with Arduino Mega 2560?

Hello everyone :slight_smile: ,

I am currently working on a robot project with an Arduino Mega 2560 and some motors with their own controllers.
Those controllers communicate with a single wire serial UART and I do not really know how to use it with the Arduino board.
It's an TTL UART communication with three cables: +5V, Ground and Data.

How do I have to connect them?
May I still can use the Serial.xxxx() functions?
Do I have to make some software changes to make it work?

Did anyone already used this kind of communication?

For more details, I put the datasheet:

Thank you in advance for your help, it will be very very appreciated!

Kind regards,

Steve

Should be a piece of cake because you are using a mega board which has four hardware uarts. You could continue to use
Serial.xxxx() functions to upload your sketches and send debug messages to the arduino IDE serial monitor as you develop your sketch. Then use Serialx.yyy() functions where x = 1,2,or 3 to 'talk' to your external controlller. Just wire the proper Tx pin number corresponding to the serialx channel you use to your external controller along with +5 and ground wires. Here is reference page for uart communications.

Hello :slight_smile:

Thank you for your detailed help!
I finaly used a diode between RX and TX and a 4.7k resistor from +5V to Rx.

Steve