Pedometer

  • Description

      Pedometer

      The Pedometer is a non visible component that detects motion via the Accelerometer and try to determine if it has been made a step. Using a stride length that can be set up, you can also to estimate the distance traveled according to these strides.

  • Events

    • Simple Step
    • Event that runs when it detects a step.
    • Walk Step
    • This event executes when it detects a step while walking. The difference with the 'Simple Step', is that this step is performed in the forward movement.
    • Start Moviment
    • This event is executed when it is detected that the device is moved.
    • Finish Moviment
    • This event is executed when it is detected that the device has stopped move.
    • Calibration Failed
    • This event is executed when an error is detected in the calibration.
    • Available GPS
    • This event executes when it detects a provider GPS available.
    • Lost GPS
    • This event is executed when the signal is lost the provider GPS.
  • Procedures

    • Pause
    • This method, pause the counting of steps and distance.
    • Reset
    • This method resets the step counter, measure distance, and the time of execution.
    • Resume
    • This method resumes the counting.
    • Save
    • This method saves the state of the pedometer in the phone, allowing the accumulation of steps in applications that use the pedometer.
    • Start
    • This method, starts the counting of steps.
    • Stop
    • This method halts the counting of steps.
  • Properties

    • Distance (number)
    • Allows to get the distance traveled in meters.
    • Elapsed time (number)
    • Determines the elapsed time in milliseconds since the start of the pedometer.
    • Simple steps (number)
    • Allows you to obtain the quantity of simple steps that were performed since he started the pedometer.
    • Stop Detection Timeout (number)
    • Allows you to determine or obtain the duration in milliseconds of inactivity (there are no steps). When this time ends, the pedometer stops.
    • Stride Lenght (number)
    • Allows you to set the average length of the stride in meters.
    • Walk Steps (number)
    • Allows you to determine the amount of steps you made since you started the pedometer.
  • Example

    • Pedometer
    • Create a button that when pressed activates the pedometer, when we walk it the display shows the steps we have taken and the distance traveled.