How to start Simulink model on Raspberry Pi automatically on startup?

2 Ansichten (letzte 30 Tage)
Ahmed Desoky
Ahmed Desoky am 6 Mär. 2016
Bearbeitet: satwant singh am 30 Mär. 2017
I have built a Simulink model consisting of three blocks (Pulse generator + Data Type Conversion + GPIO Write) to flash a LED.
I loaded it onto the board, and the model ran normally from the computer in both normal and external modes. The LED was flashing. I stopped the Simulink model and unplugged the power and ethernet cables.
The Simulink model is converted into an executable that runs on the Raspberry Pi board. Typically, the executable is saved in the `/home/pi/Simulink_model_name_rtt/MW/Simulink_model_name` directory. The name of the executable is the same as the Simulink model name.
I ran the operating system of the Raspberry Pi via VNC viewer to execute the Simulink model that exists in MW folder. But the LED wasn't flashing.
Terminal from VNC viewer.
I went to Terminal from PuTTY to execute the Simulink model that exists in the MW folder. It returned the error:
Error setting GPIO pin direction.
Terminal from Putty.
*I want to run the Simulink model* that has been loaded onto the Raspberry Pi board (after Raspberry Pi booting and startup) without running the Simulink model again on the computer via Ethernet connection.
  1 Kommentar
satwant singh
satwant singh am 30 Mär. 2017
Bearbeitet: satwant singh am 30 Mär. 2017
Is internet connection is mandatory while interconnecting respberry pi with simulink?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Mark McBroom
Mark McBroom am 19 Mär. 2016
you need yo use sudo because the model is accessing pi hardware
sudo ./LED_Test
  2 Kommentare
wasted
wasted am 29 Jul. 2016
Hello Mark!
The Model on my Pi doesn't start with this command.
The Terminal displays:"Starting The Model", but the Model doesn't start and the Pi doesn't seem to be responding afterwards, because I am not able to enter any new commands..
Would be nice to be hearing from you!
wasted
wasted am 29 Jul. 2016
Solved it myself:
It is important to press: Deploy to Hardware in Simulink GUI. Pressing "Run" only does not create a standalone application on the raspberry pi (model 2 B). At least that's my experience..

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Raspberry Pi Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by