Installing Arduino sensor library to Matlab

30 views (last 30 days)
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?

Accepted Answer

Amit Charantimath
Amit Charantimath on 8 Feb 2023
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

More Answers (1)

Ashu
Ashu on 27 Jan 2023
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.

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!