Install MATLAB Add-on for Arduino - MATLAB 2022a + Arduino UNO + Mac

preview_player
Показать описание
I walk (stumble?) through the installation of the Arduino utilities for MATLAB 2022a on Mac OS 12.3.1.

I am using:
- Mac OS 12.3.1
- MATLAB 2022a
- Arduino UNO

On a Mac, one big challenge is to find the port name. I use the command "ls /dev/cu*" (without quotes) in the MATLAB command window.

Tips/Details:
1. To find the port for an Arduino connected via USB, use “ls /dev/cu*” (without the quotes) in the MATLAB Command Window. Look for something including the text “usbmodem”
2. Use “MyVar = arduino( PortName )” to create an interface to your Arduino. PortName is a char array with the exact name of the port you found in tip/detail 1.
3. If you wish to establish a new MATLAB arduino object, use the “clear()” command to clear everything or any existing MATLAB arduino object. Also, make sure that there is no active “Arduino Explorer” open in MATLAB.

0:00 - Start
0:15 - Install using "arduino" in the MATLAB Command Window
1:15 - Setup (USB connection)
4:15 - Find the Arduino port
5:55 - Successful connection (arduino object)
Рекомендации по теме
Комментарии
Автор

Thank you! If the Problem still, try a=arduino ('portwhereisyourArduino', 'name of your arduino')

salsa
Автор

I have installed simulink support package for arduino hardware, but during hardware setup, download tests fails saying that laptop port and arduino board was not connected.I have tried installing drivers and compiler but still connection was not established between port and the board. What should I do?

shalinijesus