raspberry pi linux command hang

2 次查看(过去 30 天)
Hae Min Jung
Hae Min Jung 2020-3-30
Hi, I am interfacing Matlab with an r pi to send over a command to run a python script.
The code is supposed to run for a certain amount of time, but I was looking for a way to have this not hang for return/terminate from linux.
Is there a way to achieve this?

回答(1 个)

Puru Kathuria
Puru Kathuria 2021-2-25
编辑:Puru Kathuria 2021-2-25
Hi,
I hope the raspberry pi support package has been installed and a connection has been initiated from MATLAB to Raspberry Pi.
Next, You might want to try one of these ways:
%system(raspberryPiObject, commandToBeExecuted);
%for executing python script
system(raspberryPiObject, 'python SRC_DIR/scriptName.py');
%for running python script in background
system(raspberryPiObject, 'python SRC_DIR/scriptName.py &');
  1 个评论
Sreeraj S J
Sreeraj S J 2021-7-29
Hi,
This is not working while we deploy the code in Raspberry Pi Hardware.
The same code will work only when Raspberry Pi is connected to Matlab directly.
Is there any solution to this?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB Support Package for Raspberry Pi Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by