Programming Arduino using Matlab/Simulink Setup

 Here you will learn how to setup Matlab in order to communicate with Arduino. In order to program Arduino using either Matlab(native programming) or using Simulink(block programming) we need to install Matlab and Simulink hardware support packages for Arduino. Matlab provides hardware support packages for not only Arduino boards but also many others.

In my case, Matlab support package for Arduino hardware and simulink support package for Arduino hardware was already installed and so the hardware support package library view shows "Installed" in the following picture.

Programming Arduino using Matlab/Simulink Setup



To install Matlab and Simulink Hardware Support Packages for Arduino boards follow the steps below:

1. Open Matlab, if not already open, click on the dropdown arrow icon on the Add-Ons on the Home tab. From there you can either click on the Get Add-Ons or the Get Hardware Support Packages. Here we choose Get Add-Ons so click there.

Programming Arduino using Matlab/Simulink Setup
2. In the Add-On Explorer window, type "Arduino" in the search bar. You should see "Matlab Support Package for Arduino Hardware" and "Simulink Support Package for Arduino Hardware". We need to install these two packages.



3. Click on the Matlab Support Package for Arduino Hardware and you will see the following page. 

Programming Arduino using Matlab/Simulink Setup

There you should see install button. Since in my case, the package was already installed the install button is not there but if you not yet installed the package you should see one.


4. Click on the Simulink Support Package for Arduino Hardware and you will see the following page. 


Programming Arduino using Matlab/Simulink Setup


Again since I had already installed the simulink support package the install button is not shown in above. But you should see install button if you have not already installed this package.

Once you have completed installation of the support packages, see our first simple tutorial on how to turn on and off a led by programming arduino using matlab.

Post a Comment

Previous Post Next Post