# Arduino\_APDS9960

**URL:** <https://forum.arduino.cc/t/arduino-apds9960/1247533>\
**Category:** Libraries\
**Created:** [April 14, 2024, 10:22am UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533 "2024-04-14T10:22:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre\_alm10](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/andre_alm10/32/1013044_2.png) [@andre\_alm10](https://forum.arduino.cc/u/andre_alm10)\
**Post date:** [April 14, 2024, 10:22am UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533/1 "2024-04-14T10:22:22Z")

</div>

Hello,  
Is Arduino\_APDS9960 a Arduino supported library? Im having problems with this library. It has worked but now it stopped working. I switched to SparkFun\_APDS9960 and it works.

I have purchased many different APDS9960 boards but they are different. Some are RGB and some are not. It's difficult to see what's the difference. All of them has the same name expect that some have RGB after 9960. The boards are in different sizes as well. They don't give the same values. So if Arduino APDS9960 I would have another library to test with. Any ideas are welcome!  
Regards, André.

---

<div class="post-metadata">

**Author:** ![Koepel](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/koepel/32/637546_2.png) [@Koepel](https://forum.arduino.cc/u/Koepel)\
**Post date:** [April 14, 2024, 10:52am UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533/2 "2024-04-14T10:52:36Z")

</div>

The Arduino\_APDS9960 library is straightforward, it should work for any APDS9960.

But the sensors can have different ID numbers. Someone asks to add 0xA8 to 0xAB: [https://github.com/arduino-libraries/Arduino\_APDS9960/issues/35](https://github.com/arduino-libraries/Arduino_APDS9960/issues/35)

Sparkfun checks for ID 0xAB and 0x9C: [https://github.com/sparkfun/SparkFun\_APDS-9960\_Sensor\_Arduino\_Library/blob/master/src/SparkFun\_APDS9960.h#L34](https://github.com/sparkfun/SparkFun_APDS-9960_Sensor_Arduino_Library/blob/master/src/SparkFun_APDS9960.h#L34)

Some modules with a APDS9960 are compatible with both 5V and 3.3V boards, but some modules are only for 3.3V boards. If you connect a 3.3V sensor to a 5V board, then weird things might happen (or not).

The number of counterfeit or fake parts is still increasing. Maybe there are modules with counterfeit sensors.

---

<div class="post-metadata">

**Author:** ![andre\_alm10](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/andre_alm10/32/1013044_2.png) [@andre\_alm10](https://forum.arduino.cc/u/andre_alm10)\
**Post date:** [April 14, 2024, 11:57am UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533/3 "2024-04-14T11:57:17Z")

</div>

Thank you for the good answer!

After some more testing I can read all my APDS9960 with both the Arduino Library and Sparkfun.  
After reading your reply I realize that there are many settings. Im only interested in the proximity data. With the same code I get different proximity data units from different shops. I want to read as short as possible. I have 1 batch that is okey. Closest reading is little less than 1cm, thats okey. The others are 5cm or more.  
I will take a look at different settings but maybe you know straight away what I should change?

Thanks again! // André

 ![IMG_9056.HEIC](https://europe1.discourse-cdn.com/arduino/original/4X/a/f/9/af96ec2d9b0cfabfccb2910dba3b52b260351597.jpeg)  
 ![IMG_9057.HEIC](https://europe1.discourse-cdn.com/arduino/original/4X/4/e/d/4ed2066917385122bf32e7c3d808b7485c17869c.jpeg)  
 ![IMG_9058.HEIC](https://europe1.discourse-cdn.com/arduino/original/4X/2/1/6/216677652f2243566c2c917dcbd8bcac38712bc6.jpeg)  
 ![IMG_9062.HEIC](https://europe1.discourse-cdn.com/arduino/original/4X/2/6/d/26dfa3b19d6d40032f5515a9aa7c3406e6293101.jpeg)

---

<div class="post-metadata">

**Author:** ![Koepel](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/koepel/32/637546_2.png) [@Koepel](https://forum.arduino.cc/u/Koepel)\
**Post date:** [April 14, 2024, 12:37pm UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533/4 "2024-04-14T12:37:04Z")

</div>

Which Arduino board do you use and how do you connect the 4 wires ?  
I see only one module with a level shifter that can be used with a 5V Arduino board.

 ![afbeelding](https://europe1.discourse-cdn.com/arduino/original/4X/d/8/d/d8d8c67f8d9402c68e771170a5a0f9eabc6a3e76.jpeg)

---

<div class="post-metadata">

**Author:** ![andre\_alm10](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/andre_alm10/32/1013044_2.png) [@andre\_alm10](https://forum.arduino.cc/u/andre_alm10)\
**Post date:** [April 14, 2024, 1:53pm UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533/5 "2024-04-14T13:53:05Z")

</div>

Hello, I use the Arduino Nano ESP32.  
On the I2C bus I also have a very small OLED. I have 4,7K pull ups on the bus. I use the I2C pins described in the Nano ESP32 manual.  
The sensor on the picture you sent. It says power can be 3V-5V.  
On many sensors they write 2 names. GY-9960LLC APDS-9960. I think the board is the GY...and the sensor chip is 9960.  
Another one that works good is called GY-9960-3.3 APDS-9960.

I just tested some more. I have GY-9960-3.3 APDS-9960 from different shops. From one shop the proximity sensor can measure under 1 cm. From the other shop it measure about 5-7cm. Hope there is something that can be done. I use the same Nano with the same code.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [April 14, 2024, 2:58pm UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533/6 "2024-04-14T14:58:02Z")

</div>

> [@andre\_alm10](#):
>
> I have purchased many different APDS9960 boards but they are different

When purchasing cheap modules from Amazon, Alibaba or the like, prepare to be disappointed. Or better, be happy if one actually works!

---

<div class="post-metadata">

**Author:** ![68tjs](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/68tjs/32/927374_2.png) [@68tjs](https://forum.arduino.cc/u/68tjs)\
**Post date:** [July 4, 2024, 2:09pm UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533/7 "2024-07-04T14:09:13Z")

</div>

Amazon, Alibaba or the like, they work perfectly.  
Do you have any idea of ​​the amount of money to invest to make a copy of an optical integrated circuit?  
To day modules are sold for less than €2 on aliexpress.

Problem is Adafruit and Adafruit clone schematic.  
They add a level shifter.  
It is good for 5V microcontroller, bad for 3,3 V microcontroller.

For 3,3 V microcontroller, choose a Sparkfun or Sparkfun clone.  
They don't have a level shifter.

Always look for electrical diagrams before purchasing.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [December 31, 2024, 2:09pm UTC](https://forum.arduino.cc/t/arduino-apds9960/1247533/8 "2024-12-31T14:09:33Z")

</div>

Closed on December 31, 2024, 2:09pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
