Deploy C/C++ Code from Simulink to Arduino
3 views (last 30 days)
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!
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!!