Raspberry Pi: feasibility to transfer MATLAB GUI based controller using Coder + R-Pi module vs build from scratch to duplicate MATLAB functionality.

2 views (last 30 days)
I am looking at options to deploy an application from MATLAB onto raspberry pi. The final implementation will be standalone operation on the pi. Previously, I would use the MATLAB code to define functionality and specific calculations, basically providing a detailed spec for a R-Pi coder to produce the R-Pi executable. However, it would seem sensible to use the Matlab <=> R-Pi package to create this R-Pi executable directly, provided it will works.
Therea are two issues: (1) comms and calculations and (2) GUI.
(1) comms and calculations: I think I understand the system to transfer to the pi, and looks reasonably straight forward: Use available Raspberry-Pi MATLAB module + MATLAB Coder to produce appropriate C-Code, compile using R-Pi compatible compiler, and run it on the R-pi. The particular application is no more complex or involved (from a coding point of view) than some of the example audio and video processing examples in the various websites. Hence, I am fairly confident I can produce working R-Pi code for this aspect using the R-Pi module + Coder.
(2) GUI: the GUI is just as important - if the user can't specify the control selection and/or see the outcomes, there's not a lot of point in porting the application. However, I have seen several comments to the effect "many video capabilites are not supported" (without specifics).
Thus, before I go to the (time and money) expense to extend our MATLAB and learn how to get <port to Raspberry> working, I was hoping someone could answer a couple of specific questions (Please be kind, I an no expert on MATLAB Coder or R-Pi, and certainly not the transfer/interface).
Background: In operation, the user needs to set 10 or so parameters (many would remain the same of course, but options for different use scenarios). Some are user ID (name, location,...) and others are program control: capture speed and configuration, port to use, various operational settings for the capture device/sensor (connects to Pi using USB-Serial), etc. Most are <select from a allowable list>, a couple are typed in (user ID, etc.). They will also have a "run now" and probably couple of other actual physical switch/buttons that are currently software buttons in the MATLAB app.
I realise I will need to ensure the resolution of the created app/GUI matches the available R-Pi screen resolution.
a) Critical: can I take the GUI from MATLAB App and get this over to the R-pi using only MATLAB Coder in addition to my current toolboxes? If not, what other toolboxes are required (I would prefer not to install and learn Simulink unless essential).
b) Given it could be achieved at all, how would one allow touch-screen input (which is the prefered R-Pi interface) from MATLAB on windows (which would proerly transfer to the R-Pi)? Would it be sufficient to test/implement on a windows touch-screen system (e.g. laptop)?
c) Will a plot window (showing spectra) survive the translation? Is there something particular I shoud do (or require) to achieve this.
d) How shoiuld I change the MATLAB code to accept external signal (button press) for the current software buttons, such that these could be implements on the R-pi. Is this do-able at all, and/or difficult?
Any pointers to specfific sites, and/or direct answers would be appreciated.
I am not looking for a complete solution, just to know if MATLAB + R-Pi module can achieve the desired outcome: standalone app on the R-Pi with the same functionality as the current Matlab app; or I should just get a R-Pi 'expert' to reproduce the MATLAB functionality from scratch.
Regards, Robert BC

Answers (0)

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!