Manual
Copyright © Dr Robot Inc. 2008  
12
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 
    ival = GetSensorOverheatAD2();    //2
nd
 overheating sensor 
Parameter:  void 
Return value:  short  ival; 
Return data interpretation: 
The return data is the raw value of the analog to digital converter indicating the output 
voltage of the sensor. The data range of the return value is between 0 and 4095. The 
output voltage of the sensor can be calculated from the following equation: 
Temperature (˚C) = 100- (ival – 980) / 11.6 
33  short GetSensorTemperature (); 
Description: 
GetSensorTemperature returns the current temperature value from DAT5280 Ambient 
Temperature Sensor Module. 
Syntax:  ival = GetSensorTemperature (); 










