Using a VL5310x ToF sensor on the micro:bit

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
Post Reply
djsbriscoe
Posts: 1
Joined: Sun Apr 09, 2017 8:06 am

Using a VL5310x ToF sensor on the micro:bit

Post by djsbriscoe » Sun Apr 09, 2017 8:20 am

Hi,
I'm new to the Microbit but have some experience with microcontrollers (PIC and Arduino using C) and I'm just learning Python.
I would like to know how I can use an ST VL5310x Time of Flight sensor with my Microbit. The VL6180X sensor is mentioned here

viewtopic.php?t=2919

and there is a python file mentioned here for the VL6180X

viewtopic.php?f=14&t=1902

How could this file be adapted and used with the MicroBit? Is it possible to make changes to the hexadecimal numbers(addresses?) in this file by referring to the datasheet for the VL5310X? What do I have to do then to get this to work?How would a python file be included in the source code in mu for instance?
I hope someone can help? Thanks.

David.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Using a VL5310x ToF sensor on the micro:bit

Post by deshipu » Mon Apr 10, 2017 7:14 am

Unfortunately it's a little bit more complex than just changing a couple of numbers. The VL5310x has a lot of registers that have to be initialized to correct values for it to work properly, and they are different than with VL6180x. I started writing a driver for it, based on Pololu code here https://github.com/pololu/vl53l0x-arduino but I didn't get very far yet.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Using a VL5310x ToF sensor on the micro:bit

Post by deshipu » Sat May 13, 2017 9:16 pm

Having just implemented a library for this sensor for MicroPython I must say that I don't think the Micro:bit will ever be able to properly drive that sensor. The amount of code required to set all the magical registers to their proper values is simply too large. I would recommend using an analog distance sensor, such as the ones produced by SHARP -- they are super-easy to use.

julienn
Posts: 2
Joined: Sun Jun 13, 2021 12:31 pm

Re: Using a VL5310x ToF sensor on the micro:bit

Post by julienn » Sun Jun 13, 2021 12:35 pm

Hello All,
Is there any one who was able to run the VL53L0X on the micro:bit. I'm able to run the VL53L0X on the ESP32 and the STM32 Nucleo WB55 but I could not make it work on the micro:bit :-(.
Please share with us the tips if you were able to run it.
Thanks
Julien

User avatar
Werner_G
Posts: 17
Joined: Fri Sep 13, 2019 8:15 am
Location: Dortmund / Germany

Re: Using a VL5310x ToF sensor on the micro:bit

Post by Werner_G » Mon Jun 14, 2021 11:31 am

good question! Since micro:bit V2 offers much more RAM and Flash this could be possible. I also would like to have a driver for this!

Post Reply