@@ -199,9 +199,39 @@ class Gain(CV):
199199class AS7341 : # pylint:disable=too-many-instance-attributes
200200 """Library for the AS7341 Sensor
201201
202+ :param ~busio.I2C i2c_bus: The I2C bus the device is connected to
203+ :param int address: The I2C device address. Defaults to :const:`0x39`
202204
203- :param ~busio.I2C i2c_bus: The I2C bus the AS7341 is connected to.
204- :param address: The I2C address of the sensor
205+
206+ **Quickstart: Importing and using the device**
207+
208+ Here is an example of using the :class:`AS7341`.
209+ First you will need to import the libraries to use the sensor
210+
211+ .. code-block:: python
212+
213+ import board
214+ from adafruit_as7341 import AS7341
215+
216+ Once this is done you can define your `board.I2C` object and define your sensor object
217+
218+ .. code-block:: python
219+
220+ i2c = board.I2C() # uses board.SCL and board.SDA
221+ sensor = AS7341(i2c)
222+
223+ Now you have access to the different channels
224+
225+ .. code-block:: python
226+
227+ channel_415nm = channel_415nm
228+ channel_445nm = channel_445nm
229+ channel_480nm = channel_480nm
230+ channel_515nm = channel_515nm
231+ channel_555nm = channel_555nm
232+ channel_590nm = channel_590nm
233+ channel_630nm = channel_630nm
234+ channel_680nm = channel_680nm
205235
206236 """
207237
@@ -331,7 +361,7 @@ def _wait_for_data(self, timeout=1.0):
331361 start = monotonic ()
332362 while not self ._data_ready_bit :
333363 if monotonic () - start > timeout :
334- raise RuntimeError ("Timeout occoured waiting for sensor data" )
364+ raise RuntimeError ("Timeout occurred waiting for sensor data" )
335365 sleep (0.001 )
336366
337367 def _write_register (self , addr , data ):
@@ -579,7 +609,7 @@ def _set_smux(self, smux_addr, smux_out1, smux_out2):
579609
580610 @property
581611 def gain (self ):
582- """The ADC gain multiplier. Must be a valid `adafruit_as7341.Gain`"""
612+ """The ADC gain multiplier. Must be a valid :meth: `adafruit_as7341.Gain`"""
583613 return self ._gain
584614
585615 @gain .setter
0 commit comments