System call from Simulink with external hardware (Raspberry PI)
Afficher commentaires plus anciens
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)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Modeling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!