필터 지우기
필터 지우기

Arduino on Matlab within Ubuntu 14.04

조회 수: 1 (최근 30일)
Andreas Schmid
Andreas Schmid 2016년 1월 21일
댓글: wei shulin 2018년 4월 18일
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
Andreas Schmid
Andreas Schmid 2016년 2월 11일
편집: Andreas Schmid 2016년 2월 11일
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 2018년 4월 18일
Hi,Juan Reyes thank you for your help , it really helps me out.

댓글을 달려면 로그인하십시오.

답변 (1개)

marwa diwiny
marwa diwiny 2016년 11월 12일
편집: Walter Roberson 2016년 11월 13일
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

카테고리

Help CenterFile Exchange에서 I2C Devices에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by