How do I establish a serial connection between Simulink 2018b and Arduino UNO to transmit float data?

4 ビュー (過去 30 日間)
I tried to follow the tutorials:
https://it.mathworks.com/help/supportpkg/arduino/ref/getting-started-with-arduino-hardware.html
But each of them include the use of the “Hardware tab” which is NOT PRESENT in my Simulink2018b.
I want to build a model which continuously transmits the value of an angle (float number) to the Arduino via serial communication in order to decide which led to power by the Arduino.
But if I run the model in external mode I get this error:
While if I run the model in internal mode I do not receive any data.
How should I set the model in order to make it capable of transmitting float data from Simulink to Arduino?
Thanks for your help

回答 (1 件)

Karanjot
Karanjot 2023 年 9 月 15 日
編集済み: Karanjot 2023 年 9 月 15 日
Hi Pierfrancesco,
I understand that you are facing trouble establishing a serial connection between Simulink 2018b and Arduino UNO. I recommend observing the following:
  1. Ensure that the Simulink support package for Arduino hardware is installed in the system. This enables to create and run Simulink models on Arduino board.
  2. Since the hardware tab is not visible, connect the Arduino board and try ‘Deploy to Hardware’
In case the above fails, I recommend troubleshooting and observing if Simulink is able to recognise the connected Arduino board.
To learn more about this, please refer to the documentation below:
I hope this helps!
Regards,
Karanjot Singh

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by