Manual
Copyright © Dr Robot Inc. 2008
11
27 short GetSensorHumanMotion1 ();
28 short GetSensorHumanMotion2 ();
Description:
GetSensorHumanMotion returns the current human motion value from DHM5150 Human
Motion Sensor Module. Please refer to the DHM5150 hardware manual for detailed
information.
Syntax: ival = GetSensorHumanMotion1 (); // Human direction data #1
ival = GetSensorHumanMotion2 (); // Human direction data #2
Parameter: void
Return value: short ival;
Return data interpretation:
The return data is the un-amplified raw value of the analog to digital converter indicating
the output voltage of the sensor device. The data range is between 0 and 4095.
Remarks:
To detect human motion direction, the application should compare the difference of two
samples of each sensor module’s output (to detect the change from “absence” to
“presence”), and then compare the sample data of the two sensor modules. For a single
source of human motion, the different patterns of the two sensor modules manifest the
directions of the motion. The relationship can be obtained from the experiments.
III.1.4. Tilt and Acceleration Sensor
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:










