Skip to main content
Mohan1
Associate III
Nov 4, 2019 7:57 AM UTC
Question

How to transmit serially two data simultaneously in MATLAB.

I am using STM32CubeIDE to generate a code and want to transmit two different data(voltage and temperature of battery) serially . I am able to transmit single data at a time means i am able to check voltage or temperature individually but when i am trying to send both the data simultaneously ,facing some problems like it reads only one data or getting data of voltage and temperature alternately .But i want to get separate data for further use. Please give me any suggestion.

This topic has been closed for replies.

2 replies

oleksandr.karbivsky
Senior II
Nov 4, 2019 11:53 AM UTC

Hi. Add some markers to your transmission packet. For example, packet can be: 0xAA, TempL, TempH, 0xBB, VolL, VolH. So you can handle markers and find out what data type follow after it.

Mohan1
Mohan1Author
Associate III
Nov 5, 2019 3:18 AM UTC

Thanks for your response sir,as you said that add some markers in transmission packet then it will not be a syntax error of transmission? I mean in transmit i can send only five parameters, so how can i add 6th one?