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

How to calculate time with Time of Flight sensor #8

Closed
Gbouna opened this issue Aug 28, 2019 · 1 comment
Closed

How to calculate time with Time of Flight sensor #8

Gbouna opened this issue Aug 28, 2019 · 1 comment

Comments

@Gbouna
Copy link

Gbouna commented Aug 28, 2019

Thank you for your tutorial, they were really helpful to get me started.
However i have quite a simple question but i do not know how to get my mind around it.

And according to the datasheet, Effective max convergence time depends on the actual convergence time plus readout averaging sample period setting. Please i want to know how to calculate the convergence time.

This is simply because i want to be able to calculate speed. Since the sensor reads distance, if i know the time, then i can calculate speed.
Thank you

@DavidEGrayson
Copy link
Member

If you're still looking for help with this, you can learn about the timing of the VL6180X distance measurements by reading the "Range timing" section of the datasheet. You might also want to read my comments in #9 .

However, VL6180X readings do not always take the same amount of time. So if you are trying to calculate the speed of an object, it is probably better to just read the current time using the Arduino millis() or micros() functions. Then you can divide a change in distance by a change in the time to get a speed.

We use GitHub issues to keep track of features and bugs in the library, not as a general discussion board. If you have more questions like this one, please post on our forum:

https://forum.pololu.com/

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