APDS9930 icon indicating copy to clipboard operation
APDS9930 copied to clipboard

ProximitySensor example does not work

Open ilium007 opened this issue 5 years ago • 4 comments

I cannot get the ProximitySensor to work. It seems to initialize but then gives the same range of readings over and over. Trying to read through the datasheet at the moment but am having difficulties understanding. Ambient light sensor example does work however.

Sensor is a cheapie from here: https://www.aliexpress.com/item/APDS-9930-Proximity-Sensor-Approaching-and-Non-Contact-Proximity-Module-CKIN/32746850298.html

22:40:06.003 -> ---------------------------
22:40:06.040 -> APDS-9930 - ProximitySensor
22:40:06.076 -> ---------------------------
22:40:06.076 -> APDS-9930 initialization complete
22:40:06.147 -> Proximity sensor is now running
22:40:06.147 -> 0: 0x5
22:40:06.185 -> 1: 0xED
22:40:06.185 -> 2: 0xFF
22:40:06.185 -> 3: 0xFF
22:40:06.185 -> 4: 0xFF
22:40:06.222 -> 5: 0xFF
22:40:06.222 -> 6: 0x0
22:40:06.222 -> 7: 0x0
22:40:06.222 -> 8: 0x0
22:40:06.260 -> 9: 0x0
22:40:06.260 -> A: 0x32
22:40:06.260 -> B: 0x0
22:40:06.260 -> C: 0x22
22:40:06.297 -> D: 0x0
22:40:06.297 -> E: 0x8
22:40:06.297 -> F: 0xAC
22:40:06.297 -> 12: 0x39
22:40:06.334 -> 13: 0x32
22:40:06.334 -> 14: 0xF6
22:40:06.334 -> 15: 0x0
22:40:06.334 -> 16: 0x1E
22:40:06.371 -> 17: 0x0
22:40:06.371 -> 18: 0xA9
22:40:06.371 -> 19: 0x1
22:40:06.371 -> 1E: 0x0
22:40:06.409 -> Proximity: 404
22:40:06.590 -> Proximity: 417
22:40:06.852 -> Proximity: 353
22:40:07.109 -> Proximity: 333
22:40:07.363 -> Proximity: 404
22:40:07.585 -> Proximity: 461
22:40:07.843 -> Proximity: 365
22:40:08.099 -> Proximity: 402
22:40:08.362 -> Proximity: 400
22:40:08.616 -> Proximity: 384
22:40:08.877 -> Proximity: 394
22:40:09.095 -> Proximity: 396
22:40:09.346 -> Proximity: 381
22:40:09.604 -> Proximity: 364
22:40:09.864 -> Proximity: 385
22:40:10.126 -> Proximity: 429
22:40:10.350 -> Proximity: 378
22:40:10.610 -> Proximity: 422

ilium007 avatar Apr 05 '19 11:04 ilium007

You have the same sensor as me. I had problems because i hadn't connected the VL to 3.3v

TechnicallyCoded avatar Apr 08 '19 11:04 TechnicallyCoded

facepalm yes... that worked.

ilium007 avatar Apr 08 '19 11:04 ilium007

Also this must of been the quickest response to one of my suggestions Ever.. xD

TechnicallyCoded avatar Apr 08 '19 11:04 TechnicallyCoded

lol - I was sitting here in front of the sensor trying to figure it out ! One jumper wire and it worked !

ilium007 avatar Apr 08 '19 11:04 ilium007