sensor_event_get_proximity()

Get the proximity from a SENSOR_PROXIMITY_READING event.

Synopsis:

#include <bps/sensor.h>
 
BPS_API float sensor_event_get_proximity(bps_event_t *event)

Arguments:

event
The SENSOR_PROXIMITY_READING event to get the proximity from.

Library:

libbps

Description:

The sensor_event_get_proximity() function gets the proximity from the specified SENSOR_PROXIMITY_READING event. The proximity indicates how far away the device is from the closest object.

Returns:

The proximity (in centimeters).