Hardware Support

Raspberry Pi Support from MATLAB

Acquire sensor and image data from your connected Raspberry Pi


Available now: Control your Raspberry Pi from MATLAB Online

Capabilities and Features

MATLAB® Support Package for Raspberry Pi™ Hardware provides two ways of programming Raspberry Pi applications from MATLAB.

Interactive communication: You can remotely communicate with a Raspberry Pi from a desktop installation of MATLAB or through a web browser with MATLAB Online™. Acquire data from sensors and imaging devices connected to the Raspberry Pi and then analyze and visualize it in MATLAB.

Standalone execution: With MATLAB Coder™, you can develop standalone embedded applications for Raspberry Pi. Use the interactive communication to prototype and develop your MATLAB algorithm, then automatically generate equivalent C code and deploy it to the Raspberry Pi to run as a standalone application.

Libraries of MATLAB functions are provided for the following Raspberry Pi add-ons and interfaces:

  • Raspberry Pi Sense HAT
  • Raspberry Pi Camera Module
  • USB webcam
  • I2C, SPI, and serial interfaces
  • PWM and servo motor control
  • GPIO
  • Linux system shell
 

Learn more about Raspberry Pi programming with MATLAB and Simulink.


Ready to Install?

The setup process for MATLAB Support Package for Raspberry Pi Hardware is different depending on whether you are using MATLAB on the desktop or MATLAB Online. 

Desktop MATLAB 

If you are using the desktop version of MATLAB, you need to install the support package in MATLAB.

MATLAB Online 

If you are using MATLAB Online, the support package is already installed for you. However, you need to prepare your Raspberry Pi by installing the MATLAB package for Raspberry Pi on the device.


Supported Hardware

The following Raspberry Pi models are supported by the support package. 

Raspberry Pi Model MATLAB Releases Supported Supported in MATLAB Online?
Raspberry Pi 1 Model B (discontinued) R2014a - Current  No
Raspberry Pi 1 Model B+ R2014b - Current  No
Raspberry Pi 2 Model B R2014b - Current  Yes
Raspberry Pi 3 Model B R2016a - Current  Yes
Raspberry Pi Zero W R2018a - Current  No
Raspberry Pi 3 Model B+
R2018b - Current
Yes

Note: Raspberry Pi 1 Model A, Raspberry Pi 1 Model A+, and Raspberry Pi Zero are currently not supported.


About Raspberry Pi

Raspberry Pi is a tiny, low-cost, single-board computer that supports embedded Linux operating systems, such as Raspbian. The Raspberry Pi features a Broadcom® system-on-a-chip, which includes an ARM® processor, onboard RAM, and a VideoCore IV GPU.

Platform Support

See the hardware support package system requirements table for current and prior version, release, and platform availability.

View enhancements and bug fixes in release notes.


Related Hardware Support Views: MATLAB, Consumer Electronics, Digital Signal Processing, I2C ∕ SPI, Image Processing and Computer Vision, Instrumentation, Internet of Things, MathWorks Supported, MATLAB Product Family, Medical Devices, Project-Based Learning, Raspberry Pi, Serial, Support Package Installer Enabled, Test and Measurement

Ready to install?

Before installing the support package, confirm you have the correct setup. View system requirements and installation options.

Get support package

Software

Required

Recommended

Support Package

Required

Support Package Installer installs this support package. To start the installer, go to the MATLAB toolstrip and click Add-Ons > Get Hardware Support Packages. For more information, read the documentation.

Get support package

Hardware

Required

  • Supported Raspberry Pi board (Premier Farnell/Element 14 and RS Components)
  • 4 GB microSD card (or 4GB SD card if you are using Raspberry Pi 1 Model B)
  • 5 V power supply; 700 mA or greater
  • Ethernet cable from the host computer to the Raspberry Pi
  • microSD card reader (or SD card reader for Raspberry Pi 1 Model B)

Recommended

  • Raspberry Pi camera board
  • Audio patch cables
  • USB hub with external power supply
  • Raspberry Pi Sense HAT

Don't see the hardware you're looking for?

Explore the MATLAB Maker Community