Raspberry safe shutdown button

9 次查看(过去 30 天)
I am trying to add a shutdown button to my RPi. I have found some ways using a python script but I dont know how to implement it with matalb hardware... Any help? Thanks!

回答(1 个)

Urmila Rajpurohith
Urmila Rajpurohith 2021-2-26
Hi
Eexecuting the below commands form MATLAB command window will solve the issue:
h = raspberrypi
h.execute('sudo shutdown -h now')
For more information refer to the below documentation link:
Hope this helps!

类别

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