User manual
Copyright © Dr Robot Inc. 2006 
30
III.  WiRobot SDK API Reference for PMS5005 
WiRobot SDK APIs for PMS5005 are grouped under the categories of Sensor Peripherals, Motion 
Control, Multimedia Control and Events
. 
III.1  Sensor Peripherals 
This section contains the APIs for the operations of different sensor peripherals. 
III.1.1  Batch Sensor Data Updating API 
Standard Sensors: Sonar, human, infrared range, tilt/acceleration, temperature, battery voltage and 
infrared remote control receiver 
Motor Sensors: Potentiometers, current feedback sensors and encoders. 
Custom Sensors: Custom expansion A/D inputs and digital inputs. 
1  void SystemMotorSensorRequest(int PacketNumber); 
2  void SystemStandardSensorRequest(int PacketNumber); 
3  void SystemCustomSensorRequest(int PacketNumber); 
4  void SystemAllSensorRequest(int PacketNumber); 
Description: 
SystemMotorSensorRequest sends a request command to the WiRobot Sensing and 
Motion Controller (PMS5005) in order to get the sensor data related to motor control. 
SystemStandardSensorRequest sends a request command to the WiRobot Sensing and 
Motion Controller (PMS5005) in order to get all the WiRobot standard sensor data. 
SystemCustomSensorRequest  sends a request command to the WiRobot Sensing and 
Motion Controller (PMS5005) in order to get all custom-sensor data, 
SystemAllSensorRequest sends a request command to the WiRobot Sensing and Motion 
Controller (PMS5005) in order to get all the sensor data. 
Syntax:  SystemMotorSensorRequest (PacketNumber);  // motor related sensors 
    SystemStandardSensorRequest (PacketNumber); // standard sensors 
  SystemCustomSensorRequest (PacketNumber);  // custom sensors 
SystemAllSensorRequest (PacketNumber);  // all the sensors 
Parameter:  short  PacketNumber; 
The meanings of PacketNumber as follows: 
Table III.1 Meanings of PacketNumber 
Parameter Action Requested 
PacketNumber = 0  Stop sending the sensor data packets 
PacketNumber = -1 
Send sensor data packet continuously until being asked to 
stop 
PacketNumber > 0 
Send n = PacketNumber packet(s) of sensor data and then 










