This is an example of how to use the SetSensorDIAccl, SetSensorDIAcclEx, SetSensorDIAcclDrift, ReadSensorDIAcclDrift, SensorDIAcclStatus, ReadSensorDIAccl8Raw, ReadSensorDIAccl8, ReadSensorDIAcclRaw, and ReadSensorDIAccl functions.
#define DEFAULT
#define RAW10
#ifdef RAW10
#undef RAW8
#endif
void CalibrateDIAccl(const byte port, int iter)
{
int x = 0, y = 0, z = 0;
repeat(iter)
{
}
x = (0-(x/iter))*2;
y = (0-(y/iter))*2;
z = (60-(z/iter))*2;
}
task main()
{
#ifdef DEFAULT
#else
#endif
int dx, dy, dz;
int i = 0;
int temp;
byte status;
bool done = false;
CalibrateDIAccl(
S1, 100);
while (!done){
#ifdef RAW8
#else
#endif
#ifdef RAW10
#else
#endif
}
}