System call from Simulink with external hardware (Raspberry PI)
이전 댓글 표시
I want to make a system call out of a Matlab Simulink model running on external hardware. In my case I want to switch the original Raspberry Pi Touch Display (7") off and an.
I tried using a Matlab function with a Matlab "system" command but it just doesn't have any affect on the display (the system calls itself works with the terminal).
function display_backlight(old_status)
coder.extrinsic('system')
if old_status == 1
system('echo 1 | sudo tee /sys/class/backlight/rpi_backlight/bl_power')
else
system('echo 0 | sudo tee /sys/class/backlight/rpi_backlight/bl_power')
end
end
Any ideas how to make this work or do I need to use another block like mentioned here https://stackoverflow.com/questions/4875981/system-call-from-simulink-possible (Link in the answer doesn't work)
Or do I even have to write this in C and integrate this to Simulink?
BTW: I asked the same question on stackoverflow but didn't get a response there (https://stackoverflow.com/questions/50024134/system-call-from-simulink-with-external-hardware-raspberry-pi)
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Modeling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!