From b980d55d6fde35ed8b00335b39e9e933024d3bc0 Mon Sep 17 00:00:00 2001 From: Jonghoon Seo Date: Mon, 8 Oct 2018 17:32:30 +0900 Subject: [PATCH] Call VL53L0X.open() after GPIO goes HIGH --- python/VL53L0X_multi_example.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/VL53L0X_multi_example.py b/python/VL53L0X_multi_example.py index 322a528..436beea 100755 --- a/python/VL53L0X_multi_example.py +++ b/python/VL53L0X_multi_example.py @@ -49,19 +49,19 @@ # each. tof = VL53L0X.VL53L0X(i2c_address=0x2B) tof1 = VL53L0X.VL53L0X(i2c_address=0x2D) -tof.open() -tof1.open() # Set shutdown pin high for the first VL53L0X then # call to start ranging GPIO.output(sensor1_shutdown, GPIO.HIGH) time.sleep(0.50) +tof.open() tof.start_ranging(VL53L0X.Vl53l0xAccuracyMode.BETTER) # Set shutdown pin high for the second VL53L0X then # call to start ranging GPIO.output(sensor2_shutdown, GPIO.HIGH) time.sleep(0.50) +tof1.open() tof1.start_ranging(VL53L0X.Vl53l0xAccuracyMode.BETTER) timing = tof.get_timing()