You can use MATLAB to communicate with an Arduino board using MATLAB Support Package for Arduino.

You can program an Arduino board using Simulink Support Package for Arduino. The support package automatically generates code from your  Simulink model that then runs on the Arduino board (in a click of a button). 

This tutorial covers a step-by-step guide to:

MATLAB Support Package 

  1. Set up the MATLAB support package for Arduino 
  2. Send commands from MATLAB to Arduino to blink an LED

Simulink Support Package

  1. Set up the Simulink support package for Arduino 
  2. Build a simple Simulink model for controlling pins on the Arduino
  3. Generate, download and run code on the Arduino to blink an LED

This is the first tutorial in a series on using MATLAB and Simulink to program an Arduino. In this tutorial Arduino Due is used as an example, however the same steps can be used for other boards like Uno, Mega 2560 etc. 

This guide was first published on Jan 14, 2014. It was last updated on Jan 28, 2015.

This page (Overview) was last updated on Aug 28, 2013.

Text editor powered by tinymce.