Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

VL53L1X and ESP8266


#1

Has anyone been able to get the VL53L1X to work on an ESP device? I tried an esp12 (Wemos D1 mini) and an esp32 dev board but the sensor just fails to initialize. It works fine on a Due arduino board with the test code, but can’t seem to get it to work on an esp device. Any suggestions?

I get this when trying to continuous sample code provided:

Soft WDT reset

ctx: cont 
sp: 3ffef990 end: 3ffefb70 offset: 01b0

>>>stack>>>
3ffefb40:  3fffdad0 3ffeeb18 3ffee898 40202551  
3ffefb50:  feefeffe 00000000 3ffeeb34 40203984  
3ffefb60:  feefeffe feefeffe 3ffeeb50 40100108  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld
Failed to detect and initialize sensor!

#2

Hello.

Someone else on our forum might have some experience with that, but we do not have any specific advice for using a VL53L1X with an ESP-8266-based board like the one you are using. You might consider reviewing our VL53L1X library and creating a version that works for your microcontroller.

-Jon


#3

Making my own version is a little above me I think. Maybe one day I’ll have the time for something like that. I may just have to shelf these for a while and wait and see if something comes out. Thanks for checking though.


#4

Just as a followup, I was able to get this working. So for anyone looking to do similar, you need to specify the Wire pins to use.

With my D1 mini, I just changed the line in the example code from
Wire.begin();
to
Wire.begin(D6, D5);
and used the pins actually labeled D6 and D5 (not the Arduino pinout for esp8266 devices). And it works.