Hi, I am using the 'MATLAB support package for Raspberry Pi hardware' using MATLAB 2023a. I have installed all the necessary files on the Pi. I began following the tutorial here:
https://uk.mathworks.com/help/supportpk ... dware.html
I got to the first step, ran the code below in MATLAB:
rpi = raspi('IP Address','username','password');
and was met with the following error (Practice_1 is the name of the script):
Error using Practice_1
Cannot open the device file for LED trigger source.
I found this forum on the MathWorks website:
https://www.mathworks.com/matlabcentral ... wer_888865
and followed the steps, but when I run the code:
rostopic list
I'm met with "bash: rostopic: command not found". This is the same with any other command from that post.
I posted my own question on the MathWorks forum but not getting much traction.
Any help or suggestions?
Re: Error in opening MATLAB device file for LED trigger source.
Follow these steps to resolve the issue,
Open Raspberry Pi terminal and execute
$ cd /opt/MATLAB/
$ sudo pkill mwUnifiedSrvr
$ sudo rm -rf *
Download and extract following zip files
In MATLAB, change your working directory to the above extracted files
Run >> applyPath.m file
Create a raspi object in matlab
>> r = raspi("myAddress",'pi','raspberry');
Open Raspberry Pi terminal and execute
$ cd /opt/MATLAB/
$ sudo pkill mwUnifiedSrvr
$ sudo rm -rf *
Download and extract following zip files
In MATLAB, change your working directory to the above extracted files
Run >> applyPath.m file
Create a raspi object in matlab
>> r = raspi("myAddress",'pi','raspberry');