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

3 visualizzazioni (ultimi 30 giorni)
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 Commenti
Valerio4414
Valerio4414 il 24 Ott 2017
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 il 24 Lug 2022
I hope this helps. A possible solution is to write:
>> a = arduino('/dev/ttyUSB0','Uno')

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Arduino Hardware in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by