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 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 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:

  • Jakub
    please. can you send me that source code of iphone app,
    and application for computer?
    application is for pc or mac?
    thanks
  • 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.
  • 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.
  • 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
  • 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.
  • 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
  • R. Kevin Smith

    I am a forensic engineer who does vehicle work and an application that collects and graphs the accelerometer data would be very useful. There is an iPhone app out there right now called Accelerolog, but it does not open on my intel Mac for some reason. Also, it is not set up for sale on the iTunes iPhone app store. I guarantee you if you do this app and get it onto the store you will make money. Car enthusiasts loved the old G-Analyst for their cars, but that device no longer is for sale ( I have one). If you put this as a nice app into the iPhone, I would pay you $50 bucks for it. You could get 15 to 20 bucks on the apple iPhone app store. Please let me know if you are interested. It should be able to sample at a rate of at least 30 Hz, and record the data to a file and to a graph. iPhone 3g compatibility

  • Mark

    This looks amazing! Does it work over cell wireless, or only wifi?


    Do you have the source available yet? If not, would you mind emailing it to me?

  • Teun

    Really Cool!


    Cool you send me the source, please?


    Tanks a lot!

  • Amir

    Can you send me the source for the app?
    I really need it..


    Thanks.

  • Silve

    This is really interesting.
    Have you got the code and the application? i whould like to do some experiment

blog comments powered by Disqus


Warning: include(/home/tlrobinson/tlrobinson.net/_footer-analytics.php) [function.include]: failed to open stream: No such file or directory in /home/tlrobinson/tlrobinson.net/blog/wp-content/themes/clean-look-150/footer.php on line 13

Warning: include() [function.include]: Failed opening '/home/tlrobinson/tlrobinson.net/_footer-analytics.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/tlrobinson/tlrobinson.net/blog/wp-content/themes/clean-look-150/footer.php on line 13