This is a C port of pololu's Arduino library for the ST VL53L0X time of flight sensor. It is targeted at the STM32F103 microcontroller but can be modified to be used with another µC.
For the I²C, UART and timing my own libraries are used. The following files are needed:
- usart1.h
- usart1.c
- init.h
- init.c
- i2c.h
- i2c.c
You can find them here.
A VL53L0X breakout board can be purchased from Pololu's website.
Make the following connections between the STM32F103C8T6 and the VL53L0X board:
STM32F103 VL53L0X board
------- -------------
3V3 - VIN
GND - GND
PB6 - SCL
PB7 - SDA
PB5 - XSHUT (optional)
and don't forget the pullup resistors on SDA and SCL.