Android Sensor Data to Simulink via USB

Dear all,
is there a possibility to simply stream sensor data (Orientation) from an android device to a running simulink model on the Computer via USB cable?
I found some solutions, however they require a local network. As I would like to run this application offline and outdoor, this doesn't fit for me.
The solution proposed for this question uses the external mode. However I would like to have the sensor data in another simulink model running on the Computer.
My Idea was to do it, like it is proposed in this example:
Instead of the arduino board, the model runs on the computer an the data is read with the serial receive block from the instrument toolbox.
The attached model (AndroidSerial) on the android device works. But the model (ReceiveSerialData) on the PC doesn't receive data.
Is there a problem with the configurations or is the idea to simplified?
Thanks for your help.
Best regards
Chris

回答 (1 件)

Aakriti Suman
Aakriti Suman 2020 年 5 月 7 日

0 投票

I understand that you want to stream data from an android device to your simulink model.
I am hoping that 'Simulink® Support Package for Android™ Devices' is already installed in your MATLAB system. If not, then go through this link https://in.mathworks.com/help/supportpkg/android/ug/install-support-for-android-devices.html to install the package.
Regarding your query, go through this link https://in.mathworks.com/help/supportpkg/android/examples/communicating-with-android-devices.html#d117e398 to understand how to monitor the signlas from an android device which is sent to your simulink model.

4 件のコメント

Christoph Burkhard
Christoph Burkhard 2020 年 10 月 30 日
編集済み: Christoph Burkhard 2020 年 10 月 30 日
Hi Aakriti,
thank you very much for the answer.
However this is not the solution I am looking for. Your solution will deploy and run the model directly on the device and the external mode will allow to oberserve the running model via a network connection. I have also done that so far.
But I would like to:
  1. Ddeploy and run the model on the device (Sensor Data Acquisition)
  2. Stream the data serial (COM-Port) to a computer.
  3. Run a model on the computer to receive the serial sent sensor data
The purpose is to have the data available in the model on the computer because i want to fusion this data with data from other devices.
Best regards and thanks
chris
Walter Roberson
Walter Roberson 2020 年 10 月 30 日
This used to be possible using MATLAB Mobile, but now that can only stream to MATLAB Online.
ugur arslan
ugur arslan 2020 年 12 月 30 日
May I ask the reason ?
Walter Roberson
Walter Roberson 2020 年 12 月 30 日
I do not know the reason, sorry.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeAndroid Devices についてさらに検索

タグ

質問済み:

2020 年 4 月 2 日

コメント済み:

2020 年 12 月 30 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by