MATLAB can't find arduino (MAC)
11 ビュー (過去 30 日間)
古いコメントを表示
I've been trying to connect the arduino to the MATLAB software.
>> a = arduino('/dev/tty.usbmodemfa131');
However, MATLAB constantly responds:
No Arduino hardware is found on port /dev/tty.usbmodemfa131. If using an official Arduino board, make sure it is plugged in. Otherwise, please specify both port and board type. For more information, see the arduino function reference page.
I am sure that I connected the USB to the right port. The Arduino IDE works perfectly on the same port.
To be more elaborate. I use a real Arduino UNO hardware, a macbook, MATLAB 2014a.
2 件のコメント
Giacomo Pedretti
2015 年 9 月 29 日
Same problem with Arduino Due, MacOS X, MATLAB 2015A And the funny thing is that a couple of months ago it was working perfectly. I just went back to the project and there's no way MATLAB can find arduino
回答 (3 件)
Martin Foltin
2015 年 12 月 25 日
編集済み: Walter Roberson
2015 年 12 月 25 日
Same problem. MATLAB R2015b + MacBookAIR + ARDUINO UNO. The Arduino IDE works without problems.
>> x=instrhwinfo('serial')
x =
HardwareInfo with properties:
AvailableSerialPorts: {4x1 cell}
JarFileVersion: 'Version 3.8'
ObjectConstructorName: {4x1 cell}
SerialPorts: {4x1 cell}
Access to your hardware may be provided by a support package. Go to the Support Package Installer to learn more.
>> x.SerialPorts
ans =
'/dev/tty.Bluetooth-Incoming-Port'
'/dev/cu.Bluetooth-Incoming-Port'
'/dev/tty.usbmodemFD121'
'/dev/cu.usbmodemFD121'
>> a=arduino('/dev/cu.usbmodemFD121')
Cannot find Arduino hardware on port
/dev/cu.usbmodemFD121. Make sure Arduino hardware
is properly plugged in. Otherwise, please specify
both port and board type. For more information,
see arduino function reference page.
>>
0 件のコメント
Martin Foltin
2015 年 12 月 25 日
編集済み: Walter Roberson
2015 年 12 月 26 日
>> a=arduino('/dev/cu.usbmodemFD121','Uno')
a =
arduino with properties:
Port: '/dev/cu.usbmodemFD121'
Board: 'Uno'
AvailablePins: {'D2-D13', 'A0-A5'}
Libraries: {'I2C', 'SPI', 'Servo'}
Important is 'UNO' parameter !!!
0 件のコメント
Luis
2016 年 9 月 29 日
Please, type the command as following:
>> a = arduino('/dev/cu.usbmodemfd121','Due')
Updating server code on Arduino Due (/dev/cu.usbmodemfd121). Please wait.
a =
arduino with properties:
Port: '/dev/cu.usbmodemfd121'
Board: 'Due'
AvailableAnalogPins: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
AvailableDigitalPins: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53]
Libraries: {'I2C', 'SPI', 'Servo'}
>>
% Its very important to notice that '/dev/cu.usbmodemfd121' is different from '/dev/cu.usbmodemFD121'. If you do so, you will get the error message you are receiving. So, pay attention, please!!!!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で MATLAB Support Package for Arduino Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!