Hardware Support

Raspberry Pi Support from MATLAB

Acquire sensor and image data from your connected Raspberry Pi

Capabilities and Features

With MATLAB® Support Package for Raspberry Pi™ Hardware, you can remotely communicate with a Raspberry Pi computer and use it to control peripheral devices. This support allows you to acquire data from sensors and imaging devices connected to the Raspberry Pi and then analyze and visualize it in MATLAB.

Connect to your Raspberry Pi from a desktop installation of MATLAB or through a web browser with MATLAB Online™.

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
Note: You cannot execute MATLAB code locally on a Raspberry Pi. To develop applications for the Raspberry Pi to be used in standalone operation, please see Raspberry Pi Support from MATLAB Coder® or Raspberry Pi Support from Simulink®.

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

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

Available in R2018a: MATLAB Support for the Raspberry Pi Zero W

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




Support Package


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



  • 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)


  • 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