In using Samsung acclerometer

Posted by cheesebunz on Stack Overflow See other posts from Stack Overflow or by cheesebunz
Published on 2010-04-23T04:33:10Z Indexed on 2010/04/23 5:03 UTC
Read the original article Hit count: 317

Filed under:

Hi everyone , i have this sample code i want to use. I'm not sure where to place it. I'm using Visual studio 2008 , windows mobile 6 sdk. I wish to test the accelerometer but i'm not sure where i should code it. The start is e.g. form1. Do i create new existing item > new program.cs a new C# file and do this(as of below)?

#include "smiAccelerometer.h"
SmiAccelerometerVector accel;
// get the acceleration vector containing X, Y, Z components
if (SmiAccelerometerGetVector(&accel) == SMI_SUCCESS)
{
// Successfully got acceleration.
// Use accel.x, accel.y and accel.z in your application
}
else
{
// failed to get the acceleration
}

© Stack Overflow or respective owner

Related posts about c#