Page 1 of 1

Proximity sensor using VL53L0x

Posted: Wed Mar 18, 2020 4:53 pm
by Maser
Hello

I am trying to use the VL53L0x and a Trinket M0 to sense the presens of a person.

I have got it to work meassureing distance with the given CircuitPhyton code:

import board
import busio
import adafruit_vl53l0x

i2c = busio.I2C(board.SCL, board.SDA)
vl53 = adafruit_vl53l0x.VL53L0X(i2c)
vl53.measurement_timing_budget = 20000

while True:
print('Avstand: {0} mm'.format(vl53.range))
time.sleep(1.0)

But rather than meassuring distance I would like it to give a signal on any of the io pins of the Trinket (to drive a relay or a transistor).
I have spent the day looking for such a code with limited sucsess.
Can anybody help :?:

Regards Jan S

Re: Proximity sensor using VL53L0x

Posted: Wed Mar 18, 2020 5:02 pm
by Roberthh
It looks like the wrong place to ask. Better ask at the adafruit forum: https://forums.adafruit.com/

Re: Proximity sensor using VL53L0x

Posted: Thu Mar 19, 2020 7:01 am
by Maser
Thanks :D

Re: Proximity sensor using VL53L0x

Posted: Sat Mar 28, 2020 3:56 am
by devnull
Did you do a search ??

search.php?keywords=VL53L0x

There's already quite a lot about this device in these forums :D