File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,34 @@ class EMC2101: # pylint: disable=too-many-instance-attributes
142
142
143
143
:param ~busio.I2C i2c_bus: The I2C bus the EMC is connected to.
144
144
145
+
146
+ **Quickstart: Importing and using the device**
147
+
148
+ Here is an example of using the :class:`EMC2101` class.
149
+ First you will need to import the libraries to use the sensor
150
+
151
+ .. code-block:: python
152
+
153
+ import board
154
+ from adafruit_emc2101.emc2101_lut import EMC2101_LUT as EMC2101
155
+
156
+ Once this is done you can define your `board.I2C` object and define your sensor object
157
+
158
+ .. code-block:: python
159
+
160
+ i2c = board.I2C() # uses board.SCL and board.SDA
161
+ emc = EMC2101(i2c)
162
+
163
+ Now you have access to the :attr:`manual_fan_speed` attribute to setup the
164
+ desired fanspeed
165
+
166
+ .. code-block:: python
167
+
168
+ emc.manual_fan_speed = 25
169
+
170
+
171
+
172
+
145
173
If you need control over PWM frequency and the controller's built in temperature/speed
146
174
look-up table (LUT), you will need :class:`emc2101_lut.EMC2101_LUT` which extends this
147
175
class to add those features, at the cost of increased memory usage.
You can’t perform that action at this time.
0 commit comments