필터 지우기
필터 지우기

MATLAB does not detect my Arduino

조회 수: 31 (최근 30일)
Fatemeh Hamidizadeh
Fatemeh Hamidizadeh 2020년 10월 20일
댓글: Walter Roberson 2024년 1월 30일
Hi, I am using Macbook, and when i want to connect my arduino to MATLAB,using a hub, it does not detect the hardware while I am able to connect it to arduino application. How can I fix it?

답변 (1개)

Jemima Pulipati
Jemima Pulipati 2020년 10월 22일
Hello,
From my understanding, you are receiving an "Cannot detect arduino hardware" error when trying to connect an arduino in MATLAB on Macbook while using the "arduino()" command.
Without specifying parameters to the "arduino" command, MATLAB seems to be having trouble detecting Arduino devices on your machine.
Please try connecting to the Arduino board by explicitly specifying the port ID and board type in the "arduino" call. On a Mac the port string often starts with "/dev/". As an example:
>> a = arduino('/dev/tty.usbmodem1421','Uno')
a =
arduino with properties:
Port: 'COM3'
Board: 'Uno'
AvailablePins: {'D2-D13', 'A0-A5'}
Libraries: {'I2C'}
There could be several reasons you are experiencing the issues. You can try the following troubleshooting steps mentioned in the MathWorks documentation.
If you are still experiencing arduino hardware issues, contact MathWorks Technical Support.
  댓글 수: 3
Francesco
Francesco 2024년 1월 30일
It worked! Just go on arduino check the port name, then use same name.
To connect type:
a = arduino('/dev/cu.usbserial-1110', 'uno');
%the underline is the name of my port so its just an example. You will have to find out what yours is called.
Walter Roberson
Walter Roberson 2024년 1월 30일
This sometimes happens when you connect the arduino through a hub instead of directly to the USB port.
Possibly this would not happen if you were to connect the arduino to a Thunderbolt dock.

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

카테고리

Help CenterFile 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!

Translated by