Skip to content

Commit 6a97062

Browse files
committed
updated info docstring; docstring formatting
1 parent 5e80c51 commit 6a97062

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

adafruit_vl6180x.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@
2727
examples/simpletest.py for a demo of the usage.
2828
2929
* Author(s): Tony DiCola
30+
31+
Implementation Notes
32+
--------------------
33+
34+
**Hardware:**
35+
36+
* Adafruit `VL6180X Time of Flight Distance Ranging Sensor (VL6180)
37+
<https://www.adafruit.com/product/3316>`_ (Product ID: 3316)
38+
39+
**Software and Dependencies:**
40+
41+
* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards:
42+
https://github.com/adafruit/circuitpython/releases
43+
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
3044
"""
3145
from micropython import const
3246

@@ -81,11 +95,13 @@
8195
class VL6180X:
8296
"""Create an instance of the VL6180X distance sensor. You must pass in
8397
the following parameters:
84-
- i2c: An instance of the I2C bus connected to the sensor.
98+
99+
:param i2c: An instance of the I2C bus connected to the sensor.
85100
86101
Optionally you can specify:
87-
- address: The I2C address of the sensor. If not specified the sensor's
88-
default value will be assumed.
102+
103+
:param address: The I2C address of the sensor. If not specified the sensor's
104+
default value will be assumed.
89105
"""
90106

91107
def __init__(self, i2c, address=_VL6180X_DEFAULT_I2C_ADDR):
@@ -169,6 +185,7 @@ def read_lux(self, gain):
169185
def range_status(self):
170186
"""Retrieve the status/error from a previous range read. This will
171187
return a constant value such as:
188+
172189
- ERROR_NONE - No error
173190
- ERROR_SYSERR_1 - System error 1 (see datasheet)
174191
- ERROR_SYSERR_5 - System error 5 (see datasheet)

0 commit comments

Comments
 (0)