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
Raspberry Pi 4 Model B R2020a - Current Yes
Raspberry Pi Zero 2 W R2023a - Current Yes
Raspberry Pi Compute Module 4 R2023a - 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.