Manual

Copyright © Dr Robot Inc. 2008
13
Parameter: void
Return value: short ival;
Return data interpretation:
Temperature (˚C) = (ival – 1256) / 34.8
III.1.6. Infrared Remote Control Handling
34 short GetSensorIRCode1();
35 short GetSensorIRCode2();
36 short GetSensorIRCode3();
37 short GetSensorIRCode4();
Description:
GetSensorIRCodeX returns the four parts of a two-16-bit-code infrared remote control
command captured by the Sensing and Motion Controller (PMS5005) through the Infrared
Remote Controller Module (MIR5500).
Syntax: ival = GetSensorIRCode1 (); // the first code
ival = GetSensorIRCode2 (); // the second code
ival = GetSensorIRCode3 (); // the third code
ival = GetSensorIRCode4 (); // the fourth code
Parameter: void
Return value: short ival
Return data interpretation:
The recovered infrared remote control command (4 bytes code) is as follows:
Key Code: [the third byte] [the second byte] [the first byte]
Repeat Code: [the fourth byte]
where the repeat code would be 255 if button is pressed continuously.
38 void SetInfraredControlOutput (UWord16 LowWord, UWord16 HighWord);
Description:
SetInfraredControlOutput sends two 16-bit words infrared communication output data to
the Sensing and Motion Controller (PMS5005). The PMS5005 will then send the data out
through the infrared Remote Controller Module (MIR5500). In the case of being used for
infrared remote control, the output data serves as the remote control command.
Syntax: SetInfraredControlOutput (LowWord, HighWord);
Parameter: UWord16 LowWord; // 1
st
word