Executing a python program in a raspberry pi
조회 수: 18 (최근 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!