Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why some measurements are longer than others? #53

Open
mglowinski93 opened this issue Dec 3, 2021 · 1 comment
Open

why some measurements are longer than others? #53

mglowinski93 opened this issue Dec 3, 2021 · 1 comment

Comments

@mglowinski93
Copy link

mglowinski93 commented Dec 3, 2021

Hi,
I noticed that one of the first measurements takes significantly longer than the others.

Example:

import VL53L1X
import time

tof = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29)
tof.open()
tof.set_timing(66000, 70)
tof.start_ranging(1)

for i in range(0, 5):
    start_time = time.time()
    distance = round(tof.get_distance()/10)
    print(f"{i} measurement time: {time.time() - start_time)}")

tof.stop_ranging()

image

I tried to manipulate timing budget values, but no result. It's always the same.
Do you have any idea why this is happening?

@mglowinski93 mglowinski93 changed the title why some measurements are longer than others why some measurements are longer than others? Dec 6, 2021
@Reneg973
Copy link

According to docu:

Set the timing budget and inter measurement period.
A higher timing budget results in greater measurement accuracy, but also a higher power consumption.
The inter measurement period must be >= the timing budget, otherwise it will be double the expected value.

It may lead to the effect you see!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants