Skip to content
MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
MathWorks
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out

Videos and Webinars

  • MathWorks
  • Videos
  • Videos Home
  • Search
  • Videos Home
  • Search
  • Contact sales
  • Trial software
2:56 Video length is 2:56.
  • Description
  • Full Transcript
  • Related Resources

Using a Raspberry Pi with MATLAB Online

Get started using a Raspberry Pi™ with MATLAB Online™. Set up a Raspberry Pi in the terminal app to allow MATLAB Online connections. Then you can remotely access your Raspberry Pi from anywhere that has an Internet connection after setup is complete. Discover the features for the Raspberry Pi with MATLAB Online.

In this video, I will show you how to setup your Raspberry Pi™ to use with MATLAB Online™, so you can remotely connect to your device from anywhere. You will need a Raspberry Pi with Raspbian configured with Internet. It's recommended to change your default username and password for security before you connect to the Internet.

Open the terminal on the Raspberry Pi if you have a monitor and keyboard directly connected, or remotely access the Raspberry Pi via SSH.

Now, enter this command to update your Raspberry Pi repo:

$ sudo apt-get update

Enter this command to install the MATLAB Raspberry Pi package:

$ sudo apt-get install matlab-rpi

For the installation to complete, type “y” and then “enter”.

Run this command to configure MATLAB Online connections:

$ sudo matlab-rpi-setup

You can enter a display name for your device in MATLAB Online. Enable peripherals you want by typing “y” and then “enter”. Enter your MathWorks account username and password. If you ever want to change these settings, just use the setup command again.

Reboot your Raspberry Pi, so the configuration can take effect. Now, you can connect to your Raspberry Pi to MATLAB Online from anywhere as long as it has an Internet connection.

In MATLAB Online, enter the same MathWorks credentials to sign in.

In the command window, type the command: raspilist. This will show you the online Raspberry Pis that you configured in the setup with your MathWorks account.

The function raspi() creates a connection to the Pi. You can also specify which one to connect to if there are multiple Pi’s available.

Once we connect, we can see the properties and the available peripherals we can use.

If you enter the command showLEDs(), you can see a diagram of the Raspberry Pi with the available LED. There is a similar command called showPins(), where you can see all of the available pins in the diagram.

For more help, please refer to the documentation "Connect to Raspberry Pi in MATLAB Online".

Learn More

MATLAB Online
Getting Started with MATLAB Support Package for Raspberry Pi

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper
Related Information
Related Information
Connecting to Raspberry Pi in MATLAB Online

Feedback

Up Next:

4:09
Using MATLAB and Raspberry Pi for Face Detection

Related Videos:

34:37
Collect and Analyze Data Using MATLAB and Raspberry Pi
5:42
Using MATLAB and Raspberry Pi with an I2C Sensor
6:45
Using MATLAB and Raspberry Pi with an Accelerometer
6:33
Using MATLAB with a Raspberry Pi Camera Board
MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contact sales
  • Trial software

MathWorks

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Discover…

Explore Products

  • MATLAB
  • Simulink
  • Student Software
  • Hardware Support
  • File Exchange

Try or Buy

  • Downloads
  • Trial Software
  • Contact Sales
  • Pricing and Licensing
  • How to Buy

Learn to Use

  • Documentation
  • Tutorials
  • Examples
  • Videos and Webinars
  • Training

Get Support

  • Installation Help
  • MATLAB Answers
  • Consulting
  • License Center
  • Contact Support

About MathWorks

  • Careers
  • Newsroom
  • Social Mission
  • Customer Stories
  • About MathWorks
  • Select a Web Site United States
  • Trust Center
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Join the conversation