Community news, upcoming events and general discussions
Threads: 33 Posts: 84
Get technical support from the community
Threads: 1215 Posts: 6795
Threads: 16 Posts: 58
Tell us how to make XDK better!
Threads: 35 Posts: 117
Share and discuss community member projects
Threads: 56 Posts: 262
I'm trying to send the sensor data to my computer since I want to plot it in a real-time application developed in Matlab.
I've already checked the example "StreamSensorDataOverUsb" shown in the Workbench 3.4.0. However, I'm not sure if this is the best way to do so since I also want the XDK to read and write to the serial port.
On the other hand, I guess my best alternative is to use the UART example that is in the Workbench. This includes fuctions to read and write to the serial port, but when running it- I haven't modified this at all- , I got an error in either in the Workbench or in Matlab. The reason is the serial port is being used by either of the softwares.
I found several comments here related to UART communication: https://xdk.bosch-connectivity.com/ko_KR/community/-/message_boards/message/358180
How can I address this problem?
Is there another option to address what I plan to do?
Thanks in advance!
Thanks for your reply.
With regard to USB, can I read the serial port and print on it at the same time?
I guess you've seen that Arduino can print data on the serial port and this can be read at the same time by another software, e.g. Matlab. This is what I want.
With respect to the UART example, I saw the following fuctions:
ExtensionUartExample_Read and ExtensionUartExample_Write. Can I use these functions to read/write in the serial port? I want to send data, let's say, as '%d, %d,%d'.
Thanks a lot for your useful pieces of advices.
I'll have a look at what you said and let you know if it works. Sorry for the late reply.
i wanna simulink XDK acceleration data with MATLAB in real-Time like you. and i have some problem in this way....... i'll be really happy to have contact with you to simulink that.