In using Samsung acclerometer
- by cheesebunz
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
}