This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Distance calculation ?

Dear Members,

How can I implement this formula

into a code with timer ?

I get the speed (V0 and V ) from the sensor every second.

Any ideas ?

Thanks

Parents Reply
  • Hi,

    I can't write the code for you. Did you check timer tutorial I linked? It should be fairly straightforward to type it in if you get a grasp on how the  app timer library works.

    Something like:

    1. Start the timer and retrieve the start speed V0 from sensor
    2. Stop the timer and retrieve the end speed V and the time elapsed.
    3. Calculate (V0+V)/2 and multiply it with t

    regards

    Jared 

Children
Related