70
70
class LIDARLite :
71
71
"""
72
72
A driver for the Garmin LIDAR Lite laser distance sensor.
73
+
74
+ Initialize the hardware for the LIDAR over I2C. You can pass in an
75
+ optional reset_pin for when you call reset(). There are a few common
76
+ configurations Garmin suggests: CONFIG_DEFAULT, CONFIG_SHORTFAST,
77
+ CONFIG_DEFAULTFAST, CONFIG_MAXRANGE, CONFIG_HIGHSENSITIVE, and
78
+ CONFIG_LOWSENSITIVE. For the I2C address, the default is 0x62 but if you
79
+ pass a different number in, we'll try to change the address so multiple
80
+ LIDARs can be connected. (Note all but one need to be in reset for this
81
+ to work!)
82
+
73
83
:param i2c_bus: The `busio.I2C` object to use. This is the only
74
- required parameter.
75
- :param int address: (optional) The I2C address of the device to set after initialization.
84
+ required parameter.
85
+ :param int address: (optional) The I2C address of the device to set
86
+ after initialization.
76
87
"""
77
88
78
89
def __init__ (
@@ -83,14 +94,6 @@ def __init__(
83
94
configuration = CONFIG_DEFAULT ,
84
95
address = _ADDR_DEFAULT
85
96
):
86
- """Initialize the hardware for the LIDAR over I2C. You can pass in an
87
- optional reset_pin for when you call reset(). There are a few common
88
- configurations Garmin suggests: CONFIG_DEFAULT, CONFIG_SHORTFAST,
89
- CONFIG_DEFAULTFAST, CONFIG_MAXRANGE, CONFIG_HIGHSENSITIVE, and
90
- CONFIG_LOWSENSITIVE. For the I2C address, the default is 0x62 but if you
91
- pass a different number in, we'll try to change the address so multiple
92
- LIDARs can be connected. (Note all but one need to be in reset for this
93
- to work!)"""
94
97
self .i2c_device = I2CDevice (i2c_bus , address )
95
98
self ._buf = bytearray (2 )
96
99
self ._bias_count = 0
0 commit comments