Run on Target Hardware
Build a Simulink® model and run it on your Raspberry Pi® hardware in real time. Interact with your Simulink model using signal monitoring and parameter tuning in external model.
Apps
Raspberry Pi Resource Monitor App | Monitor and manage Raspberry Pi resources (Since R2020b) |
Topics
- Support I2C Communication
Support I2C communication.
- Support SPI Communication
Enable communication with other SPI devices by using the SPI Controller Transfer block from the support package library.
- Asynchronous Serial Communication
Asynchronous serial communication.
- Signal Monitoring and Parameter Tuning
Overview of the operation of external with attached hardware boards.
Examples and How to
Communicate with Raspberry Pi Hardware
This example shows how to tune the parameters and monitor the signals of an algorithm running on Raspberry Pi® board.
Communicate with Hardware Using Connected IO
Get peripheral data from the hardware before deploying the Simulink model on the hardware.
Tune and Monitor Model Running on Hardware
Use your host computer to monitor and control an application running on the target hardware.
Run Simulink Model on Raspberry Pi Hardware
Run a Simulink model on Raspberry Pi hardware.
Automatically Run Simulink Model on Raspberry Pi After Restart
Automatically start a Simulink model deployed on Raspberry Pi hardware every time you restart the hardware.
Stop or Restart a Model Running on Raspberry Pi Hardware
Stop or restart a model running on Raspberry Pi hardware.
Configure and Calibrate Pan Tilt Hardware Using Raspberry Pi Pan Tilt HAT
This example shows how to configure and calibrate the pan and tilt hardware using the Pan Tilt HAT block from Simulink® Support Package for Raspberry Pi® Hardware.
Configure Image and Device Properties of Raspberry Pi V4L2 Video Capture Block to Detect Objects
This example shows how to configure the image and device properties of the V4L2 Video Capture block from Simulink® Support Package for Raspberry Pi® Hardware and observe the output in the SDL Video Display block.
Publish MQTT Messages and Subscribe to Message Topics
Basics of the MQTT messaging protocol.
Optimize Code for Raspberry Pi Using Code Replacement Library
Procedural guide to activate code replacement feature for Raspberry Pi hardware boards.
Working with Robot Operating System
Install ROS Melodic on Raspberry Pi
Use the instructions to install ROS melodic on your Raspberry Pi hardware board.
Start and Stop ROS Master on Raspberry Pi
Use the instructions to start and stop a ROS master on Raspberry Pi hardware board.
Workflow Examples
Implement Connected I/O to Communicate with External Peripheral Devices Using Raspberry Pi
This example shows how to implement connected I/O in Normal mode of simulation using Raspberry Pi® hardware.
Publish or Retrieve Data to Internet of Things Using ThingSpeak
Publish Data to Internet of Things using ThingSpeak.
This example shows how to use Simulink® Support Package for Raspberry Pi® Hardware to integrate a user-defined C function with a Simulink model and achieve the following:
Implement Multicore Programming with CPU Core Affinity for Raspberry Pi
This example shows how to use explicit partitioning for Simulink® Support Package for Raspberry Pi® Hardware models to create atomic subsystems and concurrently execute tasks on a multicore Raspberry Pi processor.
Related Information
Featured Examples
Communicate with EEPROM Using Raspberry Pi
Use Simulink® Support Package for Raspberry Pi® Hardware to read from and write to an SPI EEPROM.
Read Temperature from TMP102 Sensor Using Raspberry Pi
Illustrates how to use Simulink® Support Package for Raspberry Pi® Hardware to configure and read temperature from a TMP102 sensor.
Auto-Rotate Image Displayed on Raspberry Pi Sense HAT LED Matrix
Develop a Simulink® model to implement an algorithm to read the Accelerometer On-board Sense HAT and control the rotation of the image displayed on the LED matrix.
Control Color of LED Matrix on Raspberry Pi Sense HAT over WebSockets
Use the Simulink® Support Package for Raspberry Pi® Hardware to control the color of an 8x8 LED matrix on Raspberry Pi Sense HAT from a web page over WebSockets.
Stream Images from Raspberry Pi Using Robot Operating System
Stream images captured from a webcam on a Raspberry Pi® board to the host computer using a ROS communication interface. In this example, you stream images from your Raspberry Pi board to your host computer using the ROS Publish blocks. You use the ROS MATLAB® command line interface to display the images on your host computer.
Detect Boundaries of Objects Within Video Using Raspberry Pi
Identify the boundaries of objects in a live video stream on Raspberry Pi® hardware by using a MATLAB Function block with the Simulink® Support Package for Raspberry Pi Hardware. The process of identifying boundaries of objects is known as edge detection. This example implements the Sobel edge detection algorithm to identify the boundaries of the objects.
Implement Image Inversion Algorithm Using Raspberry Pi
Use the V4L2 Video Capture and the SDL Video Display blocks from the Raspberry Pi® block library to implement an image inversion algorithm with a Simulink® model, and to run the model on Raspberry Pi hardware.
Implement Parametric Audio Equalizer Using Raspberry Pi
Use ALSA Audio Playback block from the Raspberry Pi® block library to implement a parametric audio equalizer algorithm with a Simulink® model and to run the model on Raspberry Pi hardware.
Shift Pitch of Audio Signal Using Raspberry Pi
Shift the pitch of an audio signal on Raspberry Pi® hardware by using a MATLAB Function block with the Simulink® Support Package for Raspberry Pi Hardware.
Estimate Direction of Arrival with Linear Array of Microphones Using Raspberry Pi
Use the Simulink® Support Package for Raspberry Pi® Hardware to estimate the Direction of Arrival (DOA) of a sound source using multiple microphone pairs within a linear array using the Raspberry Pi hardware board. A servo motor is used to point towards the sound source based on the estimated DOA.
Build Surveillance Camera Using Android and Raspberry Pi
Use Raspberry Pi® hardware and an Android® device to build a surveillance camera.
Monitor Engine RPM Using Raspberry Pi CAN Blocks
Use Simulink® Support Package for Raspberry Pi® Hardware to monitor vehicle engine RPM and read the data on a web browser.
MODBUS TCP/IP Communication Between Client and Server Devices Using Raspberry Pi Hardware
Use the Simulink® Support Package for Raspberry Pi® Hardware to implement MODBUS® TCP/IP communication between MODBUS client and server devices. It also shows how to communicate between the two devices in four modes of operation, Client Read, Client Write, Server Read, and Server Write.
Publish and Subscribe to Messages on ThingSpeak Using MQTT Blocks on Raspberry Pi
Use the Simulink® Support Package for Raspberry Pi® Hardware to publish a message to a topic from Raspberry Pi in the ThingSpeak™ MQTT broker. This example also shows how to subscribe to a topic and receive a message from the ThingSpeak MQTT broker to Raspberry Pi. For more information on MQTT protocol, see MQTT Basics (ThingSpeak) and Publish MQTT Messages and Subscribe to Message Topics. In this example, ThingSpeak is the MQTT broker and Raspberry Pi board is the MQTT client (publisher and subscriber).
Control LED Status Using ThingSpeak TalkBack on Raspberry Pi
Use the Simulink® Support Package for Raspberry Pi® Hardware to fetch and execute commands from a ThingSpeak™ TalkBack queue and use them to change the status of an LED onboard a Raspberry Pi hardware board.
Classify Objects Using Deep Learning Algorithm on Raspberry Pi Hardware
Use the Simulink® Support Package for Raspberry Pi® Hardware to deploy a deep learning algorithm that classifies objects using the ResNet-50 convolutional neural network. This pretrained network is 50 layers deep and can classify images into 1000 object categories, such as keyboard, mouse, pencil, and many more. You can experiment with different objects in your surroundings to see how accurately the network classifies images on the Raspberry Pi hardware.
Recognize Handwritten Digits Zero to Nine Using MNIST Data Set on Raspberry Pi Hardware
Use the Simulink® Support Package for Raspberry Pi® Hardware to recognize images of handwritten digits from zero to nine. In this example, a web camera interfaced with a Raspberry Pi hardware board is used to capture images of the handwritten numbers. The algorithm recognizes the digits and then outputs a label for the digit along with its prediction probability.
Perform Predictive Maintenance for Rotating Device Using Machine Learning Algorithm on Raspberry Pi
Use the Simulink® Support Package for Raspberry Pi® Hardware to predict and monitor the health of a rotating device using a machine learning algorithm. You can use this example for predictive maintenance of any rotating device or piece of equipment so that you can fix them before they fail.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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: .
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
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)