Overview

You can use MATLAB to communicate with a Raspberry Pi board and its peripheral devices using MATLAB Support Package for Raspberry Pi.

You can program Raspberry Pi boards to run your algorithms using Simulink Support Package for Raspberry Pi Hardware. The support package generates code from your Simulink model in a click of a button that then runs on the Raspberry Pi board. 

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

MATLAB Support Package 

  1. Set up the MATLAB support package for Raspberry Pi 
  2. Send commands from MATLAB to Raspberry Pi to blink the on-board LED

Simulink Support Package

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

This is the first tutorial in a series on using MATLAB and Simulink to program a Raspberry Pi. In this tutorial Raspberry Pi 2 is used as an example, however the same steps can be used for other boards like Raspberry Pi Model B+ etc. 

Last updated on 2015-05-04 at 04.27.56 PM Published on 2015-04-16 at 05.42.45 PM