Arduino_APDS9960 - gestureAvailable()

Checks if the sensor has detected gestures. The detected gesture can be read using the APDS.readGesture() function. This function also enables the gesture sensor when called for the first time.

Syntax

APDS.gestureAvailable()

Parameters

None.

Returns

1 if a gesture has been detected, otherwise 0.

Example

if (APDS.gestureAvailable()) {
    // a gesture was detected
    int gesture = APDS.readGesture();
}

See also