liske / python-apds9960

Python APDS-9960 Library
GNU General Public License v3.0
78 stars 27 forks source link

Gesture issue on rpi #9

Open vash3d opened 5 years ago

vash3d commented 5 years ago

Hi, I'm trying your library on a rpi3 b+ The proximity example works as expected but I've some issue with the gesture one.

If I use your script as is, I get INTERRUPT printed indefinitely and gesture are not recognized. If I remove the interrupt part of the code the script start and wait but gesture are still not recognized

I've setup the sensor as per your instruction in the Readme.

Any hint? Thank you

vash3d commented 5 years ago

UPDATE: Not setting the baud rate to 400KHz in config.txt resolve the indefinitely INTERRUPT printing issue. But gesture still are not recognized.

I've tried to change the value of apds.setProximityIntLowThreshold(50) but it has no effect.

liske commented 5 years ago

I'm use this library on several RPi 3B (revision a02082) using apds-gesture-ui.

jimmyeao commented 5 years ago

UPDATE: Not setting the baud rate to 400KHz in config.txt resolve the indefinitely INTERRUPT printing issue. But gesture still are not recognized.

I've tried to change the value of apds.setProximityIntLowThreshold(50) but it has no effect.

I have the same issue, did you get anywhere? I have had to resort to the adafruit libraries https://learn.adafruit.com/adafruit-apds9960-breakout/circuitpython but only gives me 4 gestures. I would really like to read the raw data

poulsp commented 4 years ago

As @vash3d and @jimmyeao I have the same issue and I have tested on rpi3 b+, rpi3 a+ and rpi3 b. Are any of you got any futher?

jimmyeao commented 4 years ago

I haven't retested, I am still using the adafruit library, but the range and accuracy isnt great, so Im looking at a microwave based sensor now.

P4LIL commented 3 years ago

for the cheap sensors try adding, apds.setGestureLEDDrive(APDS9960_LED_DRIVE_50MA) apds.setGestureGain(APDS9960_GGAIN_2X) works for me. I think there are some power issues with them

lijutsang commented 2 years ago

对于便宜的传感器尝试添加, 对我有用。我认为它们存在一些电源问题apds.setGestureLEDDrive(APDS9960_LED_DRIVE_50MA)``apds.setGestureGain(APDS9960_GGAIN_2X)

It works for me

lijutsang commented 2 years ago

apds.setProximityIntLowThreshold(0) apds.setProximityIntHighThreshold(200) apds.setGestureEnterThresh(0) apds.setGestureExitThresh(200) apds.setGestureLEDDrive(APDS9960_LED_DRIVE_50MA) apds.setGestureGain(APDS9960_GGAIN_2X) apds.enableGestureSensor()

lijutsang commented 1 year ago

对于便宜的传感器,尝试添加, 为我工作。我认为它们存在一些电源问题apds.setGestureLEDDrive(APDS9960_LED_DRIVE_50MA)``apds.setGestureGain(APDS9960_GGAIN_2X)

thanks