Executing a python program in a raspberry pi
9 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Nagasai Bharat
on 24 Nov 2020
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');
See Also
Categories
Find more on MATLAB Support Package for Raspberry Pi Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!