How to use arduino libraries in simulink

조회 수: 24 (최근 30일)
Mirko Mirabella
Mirko Mirabella 2021년 5월 7일
댓글: Rik 2021년 5월 22일
Good morning,
I would like to use arduino functions such as "digitalWrite" or libraries such as "SoftwareSerial" in the Arduino IDE within a simulink model.
Is there a quick way to import these libraries and use the functions inside the Stateflow state machine model?
I would to create simulink model that is able to use the function present in custom or standar arduino library.
I have some project developted with Arduino IDE that are present a specifics libraries to use for display or sensors or another devices.
My version of MATLAB/Simulink is 2021a
In this new version, Simulink has a new features C Coder Importer.
Can I use this functionality?
Thanks
  댓글 수: 1
Rik
Rik 2021년 5월 22일
Comment posted as asnwer by @Mirko Mirabella:
Good morning, has anyone tried to use the Arduino Softwareserial.h library within Simulink or Stateflow?
I'm trying to insert this library, but I haven't got results yet, it depends on many .h files in the Arduino toolchain.

댓글을 달려면 로그인하십시오.

채택된 답변

Pradeep KS
Pradeep KS 2021년 5월 13일
Refer the below documentation links for creating a custom Simulink Device Driver block using Arduino library.
  댓글 수: 1
Rik
Rik 2021년 5월 14일
Comment posted as answer by @Mirko Mirabella:
Good morning, thanks for the links, I will try to follow the guides.
I have a few more questions to ask.
Is it possible to use the functions in the Arduino toolchain directly in simulink without having to create a driver block?
For example I would like to use some functions within stateflow and not as simulink blocks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Device Driver Blocks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by