adafruit / Adafruit_CircuitPython_CLUE

A high-level library representing all the features of the Adafruit CLUE
MIT License
32 stars 20 forks source link

gesture example not working #34

Closed jerryneedell closed 4 years ago

jerryneedell commented 4 years ago

If I run the example from the code (or ReadtheDocs)

from adafruit_clue import clue

while True:
    print("Gesture: {}".format(clue.gesture))

it just keeps returning 0

FYI - the apds9960_gesture_simpletest works as expected.

ladyada commented 4 years ago

hmm we may want to make the simple test a little more advanced where it checks the gesture isnt 0 (which means, none detected) - wnana try that?

jerryneedell commented 4 years ago

I tried only reporting if non zero, but then saw nothing.

jerryneedell commented 4 years ago

I wonder if the problem is because clue.gesture re_enables gesture every call. Does that “flush”any pending reading. I’ll try to dig deeper later today or tomorrow.

jerryneedell commented 4 years ago

simple fix -- "proximity" has to be enabled along with "gesture" -- I'll put is a PR.