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

2 ビュー (過去 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 Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by