Reference   Language | Libraries | Comparison | Changes

ArduinoAPDS9960 : APDS class

gestureAvailable()

Description

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



Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.