User manual

Copyright © Dr Robot Inc. 2005
35
29 short GetSensorTiltingX ();
30 short GetSensorTiltingY ();
Description:
GetSensorTiltingX, GetSensorTiltingY, return the current tilt angle values in the relevant
directions from DTA5102 Tilting and Acceleration Sensor Module.
Syntax: ival = GetSensorTiltingX (); // X direction
ival = GetSensorTiltingY (); // Y direction
Parameter: void
Return value: short ival;
Return data interpretation:
Tilting Angle = ArcSin ((ival- ZeroGValue) / abs(90DegreeGValue-ZeroGValue));
Remarks:
Where 90DegreeGValue and ZeroGValue are module-specific values that can be measured
by experiment:
1. Place the sensor level, so that the gravity vector is perpendicular to the measured
sensor axis
2. Take the measurement and this value would be the ZeroGValue
3. Rotate the sensor so that the gravity vector is parallel with the measured axis
4. Take the measurement and this value would be the 90DegreeGValue
5. Repeat this step for the other direction
Typical value of ZeroGValue is about 2048 and abs(90DegreeGValue-ZeroGValue) is
about 1250.
III.1.5 Temperature Sensors
31 short GetSensorOverheatAD1 ();
32 short GetSensorOverheatAD2 ();
Description:
GetSensorOverheatADX returns the current air temperature values near the relevant DC
motor drive modules (MDM5253), which could be used for monitoring whether the motor
drivers are overheating or not. This situation usually occurs if the motor currents are kept
high (but still lower than the current limit of the motor driver module) for significant amount
of time, which may result from some unfavorable inner or external system conditions and is
not recommended for regular system operations.
Syntax: ival = GetSensorOverheatAD1(); //1
st
overheating sensor