Dude, where’s my accelerometer? And can I get a gyro with that?

Translate This Page

Dude, where’s my accelerometer? And can I get a gyro with that?

  • Comments 2

Oh crude, what is that headline, what has happened to my titles?  Have I gone crazy?  No, no more than normal.  Ok, maybe.

The accelerometer is turned on in the phone by using the the following reference and using statement in your code.  Gyros may be available in the future,

Set a reference to:


Step 1, the Microsoft.Devices.Sensors is not referenced by default (why not?  I don’t know):



Step 2 select the Microsoft.Devices.Sensors namespace:



Step 3 add the using statement, note the added using Microsoft.Devices.Sensors and the sensor isn’t in the Microsoft.Phone related namespaces (I just thought to say that because I always try Microsoft.Phone and then wonder why sensors up in the intellisense list.




Now you get to work with the accelerometer.

Not going to write anymore about the accelerometer today.  Hope this helps you out.

Leave a Comment
  • Please add 6 and 3 and type the answer here:
  • Post
  • Hey you wrote more about the accelerometer later in the day, why?  You said you wouldn't.

  • well I felt like writing more about the accelerometer.  so there

Page 1 of 1 (2 items)
Generic Content

Legal Note:

  1. The author, Sam Stokes, is an employee of Microsoft
  2. There is no guarantee that anything I write is correct, I do try to make sure that what I write is correct.
  3. Use anything written in this blog at your own risk
  4. Test what I write about before using the information
  • Sometimes posts will disappear because I realized that they really don't fit with the total chaos of what I write about
  • Links are tested and available on date of publication, what others do with their links are out of my control


  • Whatever I write on this blog is unedited by management or anyone, which should be obvious from the randomness of the blog.  I simply write about things I like.
  • Microsoft does not restrict me in anyway, so I generallyblather about whatever I want to.
  • For personal reasons I will not write about:
    • Company confidential stuff, mainly because Microsoft is more transparent than any company I have ever worked for.
    • Other people unless they give me permission to write about them