Using Arduino UNO board on Scientific Linux PC with Matlab 2016a

조회 수: 3 (최근 30일)
Valerio4414
Valerio4414 2017년 10월 24일
댓글: PAUL ANGARITA 2022년 7월 24일
Hi, I'm running Matlab 2016a on a Linux PC with Scientific Linux release 6.8 (Carbon) where I have installed the Matlab Arduino Support package.
I tried to setup the board to be used with matlab as suggested on web page http://www.joakimlinde.se/microcontrollers/arduino/avr/udev.php
I have set the permission to access the device with "usermod -a -G dialout"
Then used
udevadm info -a -n /dev/ttyACM0
and creating a /etc/udev/rules.d/72-micro-devel.rules file with the following line:
SUBSYSTEM=="tty" ATTRS{manufacturer}=="Arduino*" SYMLINK+="arduino%n"
This results in the creation of an extra port " arduino0" in the /dev folder.
However in Matlab when giving trying to connect the Arduino Board I get the following error:
>>a = arduino('/dev/arduino0','Uno')
Cannot find Arduino hardware on port /dev/arduino0. Make sure Arduino hardware is properly plugged in.
Also ttyACM0 option does not work :
a = arduino('/dev/ttyACM0','Uno')
Failed to open serial port /dev/ttyACM0 to communicate with board Uno.
When I connect to the board using the Arduino IDE I'm able to select the ACM0 port and retrieve the for example the board parameters, suggesting that the connection is fine.
Any help will be appreciated!
Valerio
  댓글 수: 3
Valerio4414
Valerio4414 2017년 10월 24일
Dear Nicolas,
thanks for your reply.
I have tried to call the function without arguments before writing the post above but it does not work. Matlab asks for the port number and board type.
>> a = arduino
Specify your Arduino port number and board type.
Regards,
Valerio
PAUL ANGARITA
PAUL ANGARITA 2022년 7월 24일
I hope this helps. A possible solution is to write:
>> a = arduino('/dev/ttyUSB0','Uno')

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by