필터 지우기
필터 지우기

Shell command in Function running on Raspberry Pi

조회 수: 2 (최근 30일)
Uwe Lau
Uwe Lau 2013년 10월 18일
답변: Murat Belge 2013년 12월 9일
Hey,
i would like to make a shell command out of a matlab function, which runs external on a raspberry pi.
for example:
gatttool -b xx:xx:xx:xx:xx:xx --interactive
(The command does work, if I paste it directly into the raspberry terminal.)
Is it possbile? Or is it possbible to call a python script on the raspberry?
Thanks

답변 (1개)

Murat Belge
Murat Belge 2013년 12월 9일
You can run non-interactive commands on the Raspberry Pu using the "raspberrypi" object.
>> h = raspberrypi >> [status, message] = h.execute('ls -al')
If you are running an interactive command, pass 'true' to the execute method as the second argument:
>> h.execute('ls -al', true) for example.
Read the demo "Remote Execution of Linux® Commands" for more information.

카테고리

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