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.
Published: 23 Jul 2019
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".
Up Next:
Related Videos:
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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
- United Kingdom (English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)