Skip to main content
COroz.1
Visitor II
April 16, 2021
Question

Visual Code is not recognizing "windows.h" from "vl53l0x_platform.c" of VL53L0X's API. How should I proceed about this?

  • April 16, 2021
  • 1 reply
  • 744 views

0693W000008zj8JQAQ.png

This topic has been closed for replies.

1 reply

John E KVAM
ST Employee
April 28, 2021

The platform.c as delivered communicates from the sensor to your PC. It's not what you want. You want to commicate from the sensor to your MCU.

So the trick is to completely gut that file, leaving only the function calls. Then re-write the functions to communicate with the I2C functions of your MCU.

It's kind of a pain.

I'd go to GitHub and do a search for the VL53L and your MCU. Lots of people post and all of them have done this before you.

Another way to go - if you are using an STM32 is download the code for the VL53L1X UltraLite Driver. It has in it an example project. That example project contains a VL53L1X_Platform.c

You can adapt that platform.c to you your VL53L0_platform.c

  • john