Is it possible to generate a GUI on Raspberry Pi with Simulink and RPI Support package?

4 ビュー (過去 30 日間)
Hi! I am quite new to programming Raspberry Pi by Simulink, but it makes a lots of fun :)
Actually I want to create a real standalone application for my Raspberry Pi. So the measured data / digital in and outs will be displayed through the HDMI monitor and i can control digital i/o's by the USB hardware which is connected to my Rasperry Pi.
I am using raspberry pi 2, matlab 2015 with installed raspberry pi support package.
Thank you for your help in advance :D
Alex
  4 件のコメント
Joyeeta Chatterjee
Joyeeta Chatterjee 2017 年 6 月 28 日
I have recently used MATLAB to update the firmware on my SD card for Raspberry Pi 3 Model B as I want to build a standalone model in Simulink. Now when I try to use it with a monitor, I am not able to access the Desktop GUI. startx command doesn't seem to work. And even on using raspi-config to change Boot Options to Desktop GUI, it says to install lightdm. But since I couldn't configure WiFi or Ethernet from the command line, I could not install lightdm. So, does that mean it is not possible to access Desktop GUI if the SD card has been updated through MATLAB and not NOOBS?
Walter Roberson
Walter Roberson 2017 年 7 月 23 日
Sharon Koppolu comments to Joyeeta Chatterjee:
Very sad that Mathworks has not provided any answer

サインインしてコメントする。

回答 (3 件)

Stefanie Schwarz
Stefanie Schwarz 2017 年 9 月 28 日
The image provided by MathWorks is based on Raspbian Jessie Lite. This is a lite version of the Raspbian Jessie image. One of the differences with this image is that it is headless and does not have a Desktop GUI.
If you require a Desktop for your Raspberry Pi, you will have to install a few packages. Follow the instructions below to set up the Desktop:
1. Set up your Raspberry Pi with the Raspbian image provided by MathWorks.
2. Install the following packages to get the GUI interface:
sudo apt-get update
sudo apt-get install --no-install-recommends xserver-xorg
sudo apt-get install --no-install-recommends xinit
sudo apt-get install --no-install-recommends raspberrypi-ui-mods lxterminal gvfs
Please refer to https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691 for an explanation of the above commands.
3. Connect the HDMI monitor cable, USB camera and keyboard to Raspberry Pi and then reboot the Pi.
4. A login prompt will appear on the monitor (normal black screen – without GUI). Enter the credentials “pi” & “raspberry”
5. Enter “startx” to the prompt using the keyboard and this will show the GUI interface on the monitor.
If you have problems connecting your Raspberry Pi to the network, you may follow these instructions: https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
  1 件のコメント
Abhishek Kekud
Abhishek Kekud 2017 年 12 月 1 日
The question was to develop an GUI that can read the measured data and display it on the GUI. Not about the desktop GUI. My requirement is same as above. Develop a GUI using simulink and deploy it to raspberry pi so that the GUI fetches the realtime value and displays it on the screen.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2017 年 7 月 24 日
You can use an SDL Video Block to do the display; see https://www.mathworks.com/help/supportpkg/raspberrypi/ref/sdlvideodisplay.html
If you program everything in Simulink then you can deploy to Raspberry .
  2 件のコメント
Abhishek Kekud
Abhishek Kekud 2017 年 12 月 1 日
SDL Video block requires 3 parameters as input, YCbCr or RGB format. How can we develop a GUI on Simulink and connect it to the 3 inputs of the SDL Video Display Block.
Walter Roberson
Walter Roberson 2022 年 3 月 9 日
You can use Computer Vision toolbox insertText() and insertShape() to [eventually] create arbitrary images to be displayed.

サインインしてコメントする。


Kevin Graebner
Kevin Graebner 2019 年 6 月 13 日
why are you being so lame matlab. this is something you really need in your library to make this program more useful for developing programs.

カテゴリ

Help Center および File ExchangeRaspberry Pi Hardware についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by