Does controlling arduino via the simulink arduino link overwrite the code on the arduino itself?

조회 수: 2 (최근 30일)
I want to communicate with my Arduino through the Simulink Arduino Link. I would like to accept calculated signals from the Simulink model, and process it in Arduino. Is this possible? Or does using the Arduino link in the first place overwrite any code that is currently trying to be run on the Arduino?

답변 (1개)

arushi
arushi 2024년 9월 2일
Hi Shirahn,
I understand that you have already uploaded the code to your Arduino board and then you are trying to extract data from Simulink and use it with the code in Arduino.
Assuming that you are using the Simulink Arduino Support Package to communicate with an Arduino board, you can indeed accept calculated signals from the Simulink model and process them on the Arduino. The Simulink Arduino Support Package allows you to generate code from your Simulink model and deploy it onto the Arduino board, enabling bidirectional communication between Simulink and Arduino.
Here is how it typically works:
  1. You develop your Simulink model, which includes the calculations or signal processing algorithms you want to implement.
  2. Using the Simulink Arduino Support Package, you generate code from your Simulink model. This code is specific to your application and can include both the calculations performed in Simulink and any additional code you want to run on the Arduino.
  3. The generated code is uploaded to the Arduino board using the Arduino IDE or directly from Simulink.
  4. Once the code is running on the Arduino, it can receive inputs from Simulink, process them using your specified calculations or algorithms, and perform any additional actions or outputs as needed.
Please refer to the following MathWorks File Exchange package to know more about the Simulink Support package for Arduino:
Please refer to the following MATLAB documentation for the Arduino Support Package for Simulink:
Hope the above details help you.

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by