Executing a python program in a raspberry pi
9 次查看(过去 30 天)
显示 更早的评论
I am trying to execute a python progam that is located in a folder on a raspberry pi using a Matlab script. You execute this file in the pi using the command "sudo ./". I have attempted to do this using the following command: system(mypi,"/home/pi/Downloads/LeptonModulemaster/software/Raspberrypi_capture/Raspberrypi_capture","sudo").
Please advise.
Thanks
0 个评论
回答(1 个)
Nagasai Bharat
2020-11-24
Hi,
According to my understanding you want to run a python file in the raspberry pi to be executed from MATLAB. After the support package is installed and a connection has been creating between raspberry pi and MATLAB.
To execute a python program you use "python filename.py" or "python3 filename.py". Try the following line of code
system(mypi,'python /home/pi/Downloads/LeptonModulemaster/software/Raspberrypi_capture/Raspberrypi_capture.py','sudo');
另请参阅
类别
在 Help Center 和 File 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!