Deploy C/C++ Code from Simulink to Arduino
37 views (last 30 days)
Show older comments
Hello all,
I have developed a fan controller in Simulink for an Arduino MEGA and operated the system in "external mode" (inputs: potentiometer-->speed setpoint, Hall signal-->speed actual value). This works wonderfully.
I would now like to pass the model on to a colleague who, however, does not use Matlab/Simulink. Is there a simple way to compile the "fan_controller" and integrate it in the Arduino IDE as fast and easy as possible?
I have searched here in the forum as well as in the web for solutions, however the information there did not help me, since I am a newcomer to the topic of Arduino and therefore need as "simple instructions" as possible.
I am grateful for any help!
Kind regards
Felix
0 Comments
Accepted Answer
Ritish Sehgal
on 1 Jul 2022
It is my understanding that you want to deploy C/C++ code generated from a Simulink model to Arduino Mega target board.
You can use Simulink Support Package using which you can deploy your code on Arduino Mega board. Your model will run as standalone, i.e. independent of the Simulink environment on the board.
I have attached the link to the video which shows the installation of the Simulink Support Package in your system:
Below is a link to the documentation which gives an example of how to use Simulink Support Package with Arduino hardware:
If you wish to learn more about Arduino and its concepts you can refer to the link below which includes interactive Arduino projects:
Hope it helps!!
1 Comment
Azizhan
on 7 Sep 2023
Hi,
I think you didnt answer the his question. There is no explict information How we can use the Embedded coder to link and build for arduino devices. I have support package but I dont want to use, I want to pack all the artifacts and compile externaly using avrdude or equivalent compiler via comand propmt or visual stuido code. We are developping a real product and we need to use later on some certificated compiler. Could you give some example or clear instructions?
Thanks.
More Answers (0)
See Also
Categories
Find more on Modeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!