Skip to content

6. API: Sensor Function

waiweng83 edited this page Aug 11, 2015 · 15 revisions

These are the functions to communicate with the sensors.

Function: eSensorSetLed

Turn on/off the sensor LED.

Function Prototype:

EM_ERROR eSensorSetLed( unsigned char ucId,
                        EM_MODEL eModuleType,
                        unsigned char ucLedValue );

Parameters:

  • ucId - Sensor ID.
  • eModuleType - Sensor type.
  • ucLedValue - Sensor LED value. ~ 0 - Off
    ~ 1 - On
    ~ 2 - Trigger

Return:

Example:

// Turn on the IR sensor LED.
eSensorSetLed(200, EM_MODEL_IR, 1);

Clone this wiki locally