MATLAB to Arduino Program Conversion

MATLAB is a programming platform providing the ability to analyze data, create models, develop algorithms, and create applications.

MATLAB is great for solving technical computing problems faster than some other traditional programming languages (such as C, C++, and Fortran) and for completing high-productivity research, development and analysis.

Examples of what you can do and learn with MATLAB:

MATLAB Features & Benefits

  • No need to memorize complicated coding techniques
  • Data is stored in the form of matrices, simplifying data analysis
  • Has built-in graphics for visualizing data
  • Designed specifically for engineers and scientists
  • The ability to implement and test algorithms easily
Have you wanted to convert a MATLAB file to work with an Arduino? Here is an easy solution. There are two options: the MATLAB support package for Arduino and the Simulink support package for Arduino.

MATLAB Support Package for Arduino

The MATLAB support package for Arduino allows you to quickly write MATLAB programs that read and write data to your Arduino.

The processing happens on the computer when you have an Arduino connected. You can interactively read and write sensor data without having to wait for your code to compile.

Visualize data through MATLAB’s vast array of plot types. Furthermore, there are pre-built functions to provide the ability to analyze sensor data.

MATLAB to Arduino
Figure 1 – MATLAB to Arduino
Simulink to Arduino
Figure 2 – Simulink to Arduino

Simulink Add-On Support Package

If you prefer the processing to happen on the Arduino, look into the Simulink support package for Arduino. Simulink, an add-on feature to MATLAB, is a block-diagram environment for developing algorithms, modeling, simulating, and analyzing dynamic systems.

With this package the algorithm is designed in Simulink, then sent to the Arduino using automatic code generation, allowing the processing to be done directly on the Arduino. As the algorithm runs, you can interactively tune and optimize the parameters. Once satisfied with the algorithm all you have to do is download the completed version for standalone execution on the Arduino.

*Many universities get a Total Academic Headcount (TAH) license, which allows students to have unlimited access to MATLAB and Simulink. Having a common programming language across campus will enable students to have access to the same set of software tools to help encourage teamwork.

You may also be interested in the following links:

The Component Source for Instructors and Future Engineers

Learn more about Jameco’s resources for educators and students, custom kitting programs, university and college curriculum kits for all skill levels in Jameco’s Education Center.