on
2021-11-24
05:32 AM
- edited on
2024-09-04
07:51 AM
by
Laurids_PETERSE
This article is for people who are used to develop their applications using the Arduino IDE but who are not familiar yet with how to use ST products in the Arduino world. This concept combines the best performance hardware with an easy Arduino IDE for fast prototyping.
The goal of this article is to show how to get started using the Arduino IDE and ST’s most popular STM32 board with ST’s most popular Time-of-Flight sensor.
In this article the X-NUCLEO-53L1A1 and a NUCLEO-F401RE will be used as an example. Please check out the article here to see all other ST Time-of-Flight sensor libraries available.
First, one needs to install the Arduino IDE if it is not done, there are many videos on the subject. A good example is here.
Once the Arduino IDE is installed, please watch a STM32duino video, by Carlo PARATA, to learn how to install the STM32 board libraries in the IDE.
Now install the VL53L1X Arduino libraries.
Start by downloading two zip files from GitHub.
The STM32duino/VL53L1X contains only the VL53L1X device Arduino Library. This library is required to be installed to allow to use the examples included in the next library.
The STM32duino/X-NUCLEO-53L1A1 contains the library supporting the expansion board (X-NUCLEO-53L1A1) and the examples.
Once the two zip files are downloaded, click on Sketch/Include Library/Add ZIP Library and browse to the directory where the two ZIP files have been downloaded to install the two libraries.
Once both libraries are installed, click on File/Examples/STM32duino X-NUCLEO-53L1A1/STM32duino/X-NUCLEO-53L1A1_HelloWord_Interrupt to load the example sketch into the IDE.
Select the right Nucleo board F401RE target.
The ranging result should be displayed on a serial terminal as shown in figure 8
Disclaimer: STMicroelectronics does not provide support to these libraries.
For any support on these libraries, refer to the STM32duino forum and STM32duino GitHub.