title: How to Count the Number of Steps Using the Accelerometer
body: <p>i want to know how to calculate steps taken using the Accelerometer.  Actually i calculate acceleration and use this code to count step</p>
  
  <pre><code>length = sqrt(x * x + y * y + z * z);
  if(length&gt;=2){
     stepcount+=1;
  }
  </code></pre>
  
  <p>where length calculate acceleration using acceleration.x, acceleration.y,acceleration.z
  But my main problem at starting the application the stepcount gives correct step value but as time pass its value is not correct.Plz help me</p>