Pedometer
Last Updated On 2021-07-16
Version 3MinSDK 7Tutorial Video
A Component that acts like a Pedometer. It senses motion via the Accerleromter and attempts to determine if a step has been taken. Using a configurable stride length, it can estimate the distance traveled as well.
Properties
You can set the below properties in the UI part of the builder.
- StopDetectionTimeout - it's a non negative integer value which is set to 2000 by default.
- StrideLength - it's a non negative float value which is set to 0.73 by default.
Block Properties
You can set the below blocks properties in the blocks section of the builder.
CalibrateStrideLength
This property has been deprecated.
Distance
The approximate distance traveled in meters.
ElapsedTime
Time elapsed in milliseconds since the pedometer was started.
Moving
This property has been deprecated.
SimpleSteps
The number of simple steps taken since the pedometer has started.
StopDetectionTimeout
The duration in milliseconds of idleness (no steps detected) after which to go into a "stopped" state
StrideLength
Set the average stride length in meters.
UseGPS
This property has been deprecated.
WalkSteps
the number of walk steps taken since the pedometer has started.
Methods
You can set the below method blocks in the blocks section of the builder.
Pause
Pause counting of steps and distance.
Reset
Resets the step counter, distance measure and time running.
Resume
Resumes counting, synonym of Start.
Save
Saves the pedometer state to the phone. Permits permits accumulation of steps and distance between invocations of an App that uses the pedometer. Different Apps will have their own saved state.
Start
Start counting steps
Stop
Stop counting steps
Events
You can set the below event blocks in the blocks section of the builder.
CalibrationFailed
This event has been deprecated.
GPSAvailable
This event has been deprecated.
GPSLost
This event has been deprecated.
SimpleStep
This event is run when a raw step is detected.
StartedMoving
This event has been deprecated.
StoppedMoving
This event has been deprecated.
WalkStep
This event is run when a walking step is detected. A walking step is a step that appears to be involved in forward motion.