Serial Communication between two micro controllers...not working!!


I want to test serial communication between two microcontrollers Arduino UNO and teensy3.6 for now. My end goal is to read GPS data through serial so at this point for testing purpose, I am just sending some fake GPS data on Arduino UNO serial. But when I tried to read the data on teensy It gives me an error saying unable to open com port. I want to know if I am going in the right direction as I thought it to be simple to send data on a serial from one controller and read it from another controller on the same port.

What is the possible reason and does it the right approach? If not suggest some alternatives to test serial data reading by teensy. The fake data can be made by Arduino or some emulator as I tried one too but no success.


You want to send and receive serial data from the UNO to the teensy by way of the USART, and you want to connect the USART of the teensy to your serial monitor at the same time and you don't see the conflict?

But when I tried to read the data on teensy It gives me an error saying unable to open com port.

I can assure you that the Teensy did NOT say that.

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.

The technique in the 3rd example will be the most reliable. It is what I use for Arduino to Arduino and Arduino to PC communication.

You can send data in a compatible format with code like this (or the equivalent in any other programming language)

Serial.print('<'); // start marker
Serial.print(','); // comma separator
Serial.println('>'); // end marker


@perehama Yes, I believe there is conflict but since I am just beginner so I tried the simple way that comes to your mind.

Again my end result is to receive serial data of GPS and save to teensy SD-card but just to run a simple test to check the baudrate compatibility and how the flow works I generate fake data with the UNO. Is there another way to do this or test this type of configuration, let me know.

@PaulS yes, it says on teensy because I first run the script to write fake data to serial with UNO and then I tried to run the teensy to receive the data available at serial using built-in example Serial event which did not work.


@PaulS yes, it says on teensy

Take a long hard look at your teensy. Just exactly how is it communicating to you that it can't open the serial port?

Your PC is telling you that, when some application on the PC tries to open the port, that some other application already has open.