Error in opening MATLAB device file for LED trigger source.
Mostra commenti meno recenti
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:
I got to the first step, ran the code
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.
Any help please? I followed the tutorials accurately on the MathWorks website
6 Commenti
Walter Roberson
il 13 Apr 2023
I see a hint that just maybe your raspberry pi might already have a startup program that is using ROS (robot operating system) and so the node might already be busy
This is a bit of a stretch, but it is not impossible.
If something like this were true then removing the startup program should work. Or flip to a new mini-SD memory card and reinstall the operating system.
Syed Hadi
il 14 Apr 2023
Walter Roberson
il 14 Apr 2023
Sorry, I do not know.
Joaquin Dillen
il 23 Apr 2023
i got the same issue... any news about this??
Syed Hadi
il 26 Apr 2023
Atakan Aral Ormanci
il 27 Apr 2023
I am getting the same error, i have checked the /sys/class/leds directory, it doesn't have led0 led1 led2. This might be causing the problem, i believe it has a function that when matlab is connected to RPi, it uses the leds, but in the connection phase, becouse it doesn't have the led0 activation command in the directory, it doesn't allow the connection.
But its just a guess.
Risposta accettata
Più risposte (2)
MathWorks MATLAB Hardware Team
il 8 Mag 2023
Spostato: Walter Roberson
il 8 Mag 2023
5 voti
Hi All,
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');
Thanks,
MathWorks
MATLAB Hardware Team
4 Commenti
Syed Hadi
il 9 Mag 2023
Antonios Gementzopoulos
il 17 Mag 2023
I have just tried it and it works as advertised.
Beryl Wicaksono
il 29 Giu 2023
This solution is also work. I have tried it.
sajid ali
il 29 Giu 2024
wonderful, it worked for me as well, thank you guys
Sandin Taci
il 4 Mag 2023
rpi = raspberrypi('IP Address','username','password')
3 Commenti
Atakan Aral Ormanci
il 4 Mag 2023
Hey @Sandin Taci
I just checked and it worked. it says its connected.
But there is still a problem. I just tried the starter kit, but it gives the same error. cannot open or find LED.
Sandin Taci
il 4 Mag 2023
Can you go through these steps again, I guess you skipped a step. Your hardware tab in the Simulink model does not look customized.
https://www.mathworks.com/help/supportpkg/raspberrypi/ref/getting-started-with-raspberry-pi-hardware.html
Atakan Aral Ormanci
il 4 Mag 2023
Modificato: Atakan Aral Ormanci
il 4 Mag 2023
i just did the steps again and then i realised the problem is with the led.
i then tried to control a servo and it worked.
Categorie
Scopri di più su MATLAB Support Package for Raspberry Pi Hardware in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!