iPhone Accelerometer Fun-ness

If you’re an Apple geek like myself, you might remember back in 1999 when WiFi was a brand new technology, and [Phil Schiller](http://en.wikipedia.org/wiki/Philip_W._Schiller) demonstrated the new iBook’s Airport feature by jumping off a balcony holding an iBook with an attached accelerometer, which sent the accelerometer data wirelessly to Steve’s demo machine for display (see below).

Well, when I found out someone figured out [how to access the raw accelerometer data](http://blog.medallia.com/2007/08/fun_with_the_iphone_accelerome.html) from the iPhone I decided it would be cool to do something with it, and I used Phil’s demo as inspiration.

The demo consists of two simple applications. One application runs on the iPhone collecting accelerometer data and sending it over the wireless network to the other application running on a computer to display the data:

The three lines correspond to the three axes of the iPhone’s accelerometer plotted over time (if you’re looking at the iPhone from straight ahead then x is red, y is green, z is blue). Source code for the applications will be up eventually, but it’s really pretty straightforward.

Of course this is just a simple little demo, but I’ve got some plans for other cool things…

As an added bonus, I found the video of Phil’s demo:

  • http://www.innovaliving.com Tin

    Can you please upload or send the source code to me as I am so interested in iphone accelerometer programming and don’t know where to start doing some experiment.. It would be great if you can help me out. Thanks in advance.

    • http://tlrobinson.net/ tlrobinson

      My code is useless with the current iPhone SDK since it was written for jailbroken iPhones.

      Apple has lots of documentation including example code for the accelerometer, which I suggest you check out. http://developer.apple.com

  • Dave

    how are you catching the data on the pc side? I’m trying to figure out how I can get a C++ app to read the iphone accelerometer data. Any help would be appreciated. Thanks.

    • http://tlrobinson.net/ tlrobinson

      Over a UDP connection via WiFi.

      • Name

        Hi.
        Would it be possible to get your iphone app and the source code on the PC side?
        Thanks again for your brilliant app

  • Cotutiu Lucian

    I like very much what you did. Can you send me the source for the app? I need for my license project. I’m in late with others task that I have to do for that project and if you send my the source code you will save me 1 week of work. I hope you will help me. Thanks.

  • Jakub

    please. can you send me that source code of iphone app,
    and application for computer?
    application is for pc or mac?
    thanks

  • http://www.facebook.com/profile.php?id=823422515 Hara Mihailidou

    can i pleeease have the code i am doing a university project and i am interested into it….
    hara_miha@hotmail.com

  • Shomari Sharpe

    hi i’m doing an iphone game. I love the music? give me the artist details. thanks

    shomari.sharpe@gmail.com

  • Shomari Sharpe

    Can you send me the FFT code

  • paladeni

    how can i contact you ? I realy want to ask you some questions