|
27 | 27 | examples/simpletest.py for a demo of the usage.
|
28 | 28 |
|
29 | 29 | * 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 |
30 | 44 | """
|
31 | 45 | from micropython import const
|
32 | 46 |
|
|
81 | 95 | class VL6180X:
|
82 | 96 | """Create an instance of the VL6180X distance sensor. You must pass in
|
83 | 97 | 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. |
85 | 100 |
|
86 | 101 | 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. |
89 | 105 | """
|
90 | 106 |
|
91 | 107 | def __init__(self, i2c, address=_VL6180X_DEFAULT_I2C_ADDR):
|
@@ -169,6 +185,7 @@ def read_lux(self, gain):
|
169 | 185 | def range_status(self):
|
170 | 186 | """Retrieve the status/error from a previous range read. This will
|
171 | 187 | return a constant value such as:
|
| 188 | +
|
172 | 189 | - ERROR_NONE - No error
|
173 | 190 | - ERROR_SYSERR_1 - System error 1 (see datasheet)
|
174 | 191 | - ERROR_SYSERR_5 - System error 5 (see datasheet)
|
|
0 commit comments