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!