Restart or Shutdown Raspberry PI crashes Matlab
6 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/163205/image.png)
Hi guys,
To restart:
system(raspberrypi,'sudo shutdown -r now')
%or
system(raspi,'sudo shutdown -r now')
It works! Raspberry Pi restarts but Matlab continues busy even after Raspberry Pi has restarted.
Also, I didn't find any documentation about raspberrypi vs raspi, what is the difference between one and other?
Best!
0 个评论
采纳的回答
Walter Roberson
2017-9-20
I am not surprised. I would tend to expect that communication with the raspberry follows a protocol, and that MATLAB will continue to believe the connection is busy until it gets the "all done" response, which it is not going to ever get because you rebooted the device.
The raspi object is designed mostly for use from MATLAB; the raspberrypi function is designed mostly for use with Simulink.
0 个评论
更多回答(1 个)
Mario Frischmann
2017-9-20
Any solutions?
1 个评论
Alejandro Ojeda
2018-7-5
编辑:Alejandro Ojeda
2018-7-5
This is nonblocking
p = raspberrypi;
p.system('sudo shutdown -r +1');
另请参阅
类别
在 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!