I added my code in and I commneted out what I didn't need from your
code.
It works decently but maybe some value adjustments will make it better
I added my code and commented out the code I didn't need.
It workds decently but you'll probably need to calibrate the values to
your phone so it counts steps properly.