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

4 visualizaciones (últimos 30 días)
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

Respuestas (1)

Karanjot
Karanjot el 15 de Sept. de 2023
Editada: Karanjot el 15 de Sept. de 2023
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

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by