APDS9960 learn guide & .proximity()

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

APDS9960 learn guide & .proximity()

Post by gallaugher »

Hi!,
I'm going through the learn guide for the APDS9960 Proximity, Color, Gesture sensor preparing examples for class. I notice on the CircuitPython example page:
https://learn.adafruit.com/adafruit-apd ... cuitpython
the guide refers to
I notice the guide refers to the the proximity() function function as:
sensor.proximity()

When I try to use this I get an error:
TypeError: 'int' object is not callable

However when I stop using this as a method & remove the parentheses like this:
sensor.proximity
things work fine. I'm using CircuitPython 7.0 on an Arduino Nano RP2040 Connect with STEMMA-QT cable hooked to the board via breadboard.

Wanted to point this out if there was a problem with the guide, but also I want to be corrected if I'm missing something.
Thanks!
John

User avatar
kattni
 
Posts: 132
Joined: Fri Aug 18, 2017 6:33 pm

Re: APDS9960 learn guide & .proximity()

Post by kattni »

You are correct! The library was updated a while back and the behavior changed from the guide, and the guide was never updated. We're in the process of updating it now.

Thanks for letting us know!

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”