Installing Arduino sensor library to Matlab

30 次查看(过去 30 天)
Hello, I want to install an Arduino library for Pololu VL53L1X to Matlab (library source here: https://github.com/pololu/vl53l1x-arduino), I tried following this example and changed
a = arduino('COM4','Uno','Libraries','Adafruit\MotorShieldV2')
to
a = arduino('COM9','Uno','libraries','VL53L1X')
The directory for the library on my computer is C:\Users\hp\Documents\<name>\Arduino\libraries\VL53L1X, so I assumed I just have to add the VL53L1X part but I'm getting this error:
Expected libraries to match one of these values:
'APDS9960', 'Adafruit/MotorShieldV2', 'CAN', 'I2C', 'MotorCarrier', 'RotaryEncoder', 'SPI', 'Serial', 'Servo',
'ShiftRegister', 'Ultrasonic'
The input, 'VL53L1X', did not match any of the valid values.
What am I doing wrong? Is there a way of including Arduino libraries to Matlab by referring to Arduino library directory?

采纳的回答

Amit Charantimath
Hi Akkaya
For libraries not directly supported by MATLAB Arduino. You can use the "Custom Arduino library" feature to integrate the VL53L1X library with MATLAB Arduino.
Here is the documentation that describes integration of Custom librares. With this feature you can integratem the driver of VL53L1X.
Thanks,
Amit

更多回答(1 个)

Ashu
Ashu 2023-1-27
Hi Akkaya,
You can not use the Arduino Libraries directly in MATLAB.
For the list of supported Arduino Libraries in MATLAB, please refer the following documentation.

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by