01-20-2021 00:19
01-20-2021 00:19
Hi guys,.
I am trying to build a swim lap counter.
Any suggestions as to the best way to use the accelerometer to identify when a swimmer has turned and a lap is complete?
Thanks.
Best Answer01-20-2021 01:55
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
01-20-2021 01:55
Depending on which device you're using, if it has a gyroscope, that's the preferred way.
https://dev.fitbit.com/build/guides/sensors/gyroscope/
Note: Only the Fitbit Ionic, Fitbit Versa, and Fitbit Sense contain a gyroscope sensor.
Best Answer01-20-2021 02:01
01-20-2021 02:01
Thanks Jon!
For the Versa 3 and Versa 2, how would you approach detecting a lap (change in direction) without the gyroscope?
Best Answer01-20-2021 03:37
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
01-20-2021 03:37
I think you'll need to do some research into the algorithms required when using an accelerometer to simulate a gyroscope.
https://electronics.stackexchange.com/questions/205644/simulate-gyroscope-through-mems-accelerometer
Another approach would be to record some data and plot it on a graph so you can see how the sensor is behaving during a swim.
https://dev.fitbit.com/build/guides/sensors/accelerometer/
Best Answer01-20-2021 13:57
01-20-2021 13:57
Great, thanks for those ideas on using an accelerometer Jon.
Best Answer01-21-2021 01:43
01-21-2021 01:43
@JonFitbit any update on the introduction of lap counting while swimming on Charge 4? As I understood this feature is also missing on the Versa 4 and Sense.
Best Answer01-21-2021 01:55
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
01-21-2021 01:55
@AdisP probably best to ask in the Charge4 forum.
Best Answer01-21-2021 01:59
01-21-2021 01:59
@JonFitbit I am asking for all three devices since I got informatiin from the FitBit support that it is in the making.
Best Answer01-21-2021 03:23
01-21-2021 03:23
And why was lap count feature excluded from Versa 3 when it was available on Versa 2?
Best Answer01-21-2021 03:41
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
01-21-2021 03:41
I'd recommend asking in the product forums, this is the developer forum.
Best Answer