Borrar filtros
Borrar filtros

Arduino on Matlab within Ubuntu 14.04

1 visualización (últimos 30 días)
Andreas Schmid
Andreas Schmid el 21 de En. de 2016
Comentada: wei shulin el 18 de Abr. de 2018
Hi, I installed Matlab 2015b on Ubuntu 14.04 => Works fine. Then also installed the Arduino support package => No warnings or errors...
Yesterday, I wanted to connect the Arduino UNO:
a = arduino('/dev/ttyUSB0')
what resulted in an error. I tried this answer and made the java file. That did not work. I find the arduino when I list the USB ports. It says Bus 007 Device 002 ... Arduino UNO R3. And in the device list I find the corresponding file which properties gave me the "/dev/ttyUSB0" address.
Has anybody a hint I could try?
  5 comentarios
Andreas Schmid
Andreas Schmid el 11 de Feb. de 2016
Editada: Andreas Schmid el 11 de Feb. de 2016
Thank you Juan, I tried all this, but in the end it did not work out. I was in contact with Mathworks support and they found out that in my Ubuntu distribution one package was missing.
So in the end this worked out:
Install the Matlab Arduino-Kit Install the missing Arduino dependencies: sudo apt-get install openjdk-6-jre avr-libc gcc-avr Create the symbolic link: sudo ln -s /dev/ttyACM0 /dev/ttyS100 Create a file called java.opts in the folder where Matlab starts (To find out where this is, start Matlab and type
pwd
in the command line)
The file tells Matlab where to find the connection, so this line must be contained: -Dgnu.io.rxtx.SerialPorts=/dev/ttyS100:/dev/ttyACM0
That's about it :-)
wei shulin
wei shulin el 18 de Abr. de 2018
Hi,Juan Reyes thank you for your help , it really helps me out.

Iniciar sesión para comentar.

Respuestas (1)

marwa diwiny
marwa diwiny el 12 de Nov. de 2016
Editada: Walter Roberson el 13 de Nov. de 2016
Please I need the help, I tried many times, but in vain, I don't know where is the problem and it can't recognize the arduino functions
>> a= arduino('/dev/ttyACM0')
The port /dev/ttyACM0 is already used by MATLAB
If you are sure that the board is connected to /dev/ttyACM0
then delete the object, execute:
delete(instrfind({'Port'},{'/dev/ttyACM0'}))
to delete the port, disconnect the cable, reconnect it,
and then create a new arduino object
Error using arduino (line 54)
Port /dev/ttyACM0 already used by MATLAB

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by