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


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:

Microsoft.Devices.Sensors

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

image

 

Step 2 select the Microsoft.Devices.Sensors namespace:

image

image

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.

 

image

 

Now you get to work with the accelerometer.

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

Comments (2)

  1. Surf4Fun says:

    Hey you wrote more about the accelerometer later in the day, why?  You said you wouldn't.

  2. Surf4Fun says:

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

Skip to main content