raspberry pi linux command hang

1 visualización (últimos 30 días)
Hae Min Jung
Hae Min Jung el 30 de Mzo. de 2020
Comentada: Sreeraj S J el 29 de Jul. de 2021
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 comentario
Prasanth Sunkara
Prasanth Sunkara el 8 de Mayo de 2020
Try system(raspiObj , 'python yourScriptname.py &');

Iniciar sesión para comentar.

Respuestas (1)

Puru Kathuria
Puru Kathuria el 25 de Feb. de 2021
Editada: Puru Kathuria el 25 de Feb. de 2021
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 comentario
Sreeraj S J
Sreeraj S J el 29 de Jul. de 2021
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?

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for Raspberry Pi Hardware en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by