The Enx.enableProximitySensor()
enables the Camera to detect the proximity. On most devices, the Proximity Sensor is implemented as a boolean-sensor.
- It returns just two values
NEAR
orFAR
. - Thresholding is done on the LUX value i.e. the LUX value of the light sensor is compared with a threshold.
- A LUX-value more than the threshold means the Proximity Sensor returns
FAR
. - Anything less than the threshold value, the sensor returns
NEAR
Class: Enx
Method: Enx.enableProximitySensor(boolean status)
Parameters:
status
– Boolean. Set to true to enable and false to disable Proximity Sensor.
Enx.enableProximitySensor(true); // Enable Sensor