Creating a counter/pedometer

Discussion in 'iOS Programming' started by nixdorf, Nov 24, 2011.

  1. nixdorf macrumors newbie

    Nov 23, 2011
    Hi all,
    Ive just started learning how to create apps for iphone, my current project is to try and create an app that allows users to enter a specific number of steps/calories (say 500) then the accelerometer would pick up each step the user would take and deduct the step or calorie burned from the original amount.
    at the moment im looking into the accelerometer for starters...
    but could anyone give me a guideline of what i should be looking into for this? im not after the code as i really want to learn myself but im kinda stuck as to where to start :confused:

    any help would be fantastic

  2. jiminaus macrumors 65816


    Dec 16, 2010
    Take a look at the UIAcceleration and UIAccelerometer classes.

    Check out the AccelerometerGraph sample code. You might want to load that onto a device and see what kind of data you get when you step around.

    From that you might be able to come up with an algorithm for detecting a step.
  3. nixdorf thread starter macrumors newbie

    Nov 23, 2011
    Awesome thank you, will have a look at that over the next few days

Share This Page