Build a Pedometer in Godot

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gruen

Well im wondering, if there is a simple way to build an pedometer with godot.
i want to write an fitnessgame where i need to detect the steps of an person.

i know how to get x,y,z values from the accelerometer, but i dont know how to build an pedometer with it. I dont have anny information about what data mark a step.

i found some examples for java, but i dont be able to mirror that to godot.
Did somebody of you guys ever build an pedometer with godot?

greetings

:bust_in_silhouette: Reply From: Artium Nihamkin

Since you already know hot to interface with the accelerator, this question is not related specifically to Godot.

A simple answer would be that for each step, when the foot is on the ground, it’s vertical velocity is 0, so you can use this information to detect a step.
You can also try asking this question in more broad and general programming sites.
Finally you can setup an experiment, measure different parameters (velocity and acceleration, rotation etc) over several steps, plot graphs and try to deduce yourself how a single step could be detected.