Skip to content

Update version info, README #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,25 @@ To install in a virtual environment in your current project:
Usage Example
=============

.. code-block:: python

import board
import busio
import digitalio
from adafruit_apds9960.apds9960 import APDS9960

i2c = busio.I2C(board.SCL, board.SDA)
int_pin = digitalio.DigitalInOut(board.D5)
apds = APDS9960(i2c, interrupt_pin=int_pin)

apds.enable_proximity = True
apds.proximity_interrupt_threshold = (0, 175)
apds.enable_proximity_interrupt = True

while True:
print(apds.proximity())
apds.clear_interrupt()

Hardware Set-up
---------------

Expand Down
2 changes: 2 additions & 0 deletions adafruit_apds9960/apds9960.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
from adafruit_bus_device.i2c_device import I2CDevice
from micropython import const

__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_APDS9960.git"

# ADDRESS_DEF = const(0x39)
# INTEGRATION_TIME_DEF = const(0x01)
Expand Down
2 changes: 2 additions & 0 deletions adafruit_apds9960/colorutility.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* Author(s): Michael McWethy
"""

__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_APDS9960.git"

def calculate_color_temperature(r, g, b):
"""Converts the raw R/G/B values to color temperature in degrees Kelvin"""
Expand Down