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
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
Hi,
I assume that you're asking how to retrieve the elapsed time.
You can use the app timer library and the function app_timer_cnt_get() to get the elapsed time. The function will return the number of elapsed ticks, so you'll have to convert this to ms, see this thread
regards
Jared
I want to get the distance but the speed is changing within time, please have a look on my xls spreadsheet attachment, Total distance in 5 seconds.xls
How can I implement it in C with timer and array of Vo and V ?
Thanks
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:
regards
Jared
ok, thanks for the idea