Is it possible to generate a GUI on Raspberry Pi with Simulink and RPI Support package?
22 views (last 30 days)
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
Stefanie Schwarz on 28 Sep 2017
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
Walter Roberson on 24 Jul 2017
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 .