|
15 | 15 |
|
16 | 16 | **Hardware:** |
17 | 17 |
|
18 | | -* `Adafruit EMC2101 Breakout <https://adafruit.com/product/4808>`_ |
| 18 | +* `Adafruit EMC2101 Breakout |
| 19 | + <https://adafruit.com/product/4808>`_ (Product ID: 4808) |
19 | 20 |
|
20 | 21 | **Software and Dependencies:** |
21 | 22 |
|
22 | 23 | * Adafruit CircuitPython firmware for the supported boards: |
23 | | - https://github.com/adafruit/circuitpython/releases |
24 | | -* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice |
25 | | -* Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register |
| 24 | + https://circuitpython.org/downloads |
| 25 | +
|
| 26 | +* Adafruit's Bus Device library: |
| 27 | + https://github.com/adafruit/Adafruit_CircuitPython_BusDevice |
| 28 | +
|
| 29 | +* Adafruit's Register library: |
| 30 | + https://github.com/adafruit/Adafruit_CircuitPython_Register |
| 31 | +
|
26 | 32 | """ |
27 | 33 |
|
28 | 34 | from micropython import const |
@@ -136,6 +142,34 @@ class EMC2101: # pylint: disable=too-many-instance-attributes |
136 | 142 |
|
137 | 143 | :param ~busio.I2C i2c_bus: The I2C bus the EMC is connected to. |
138 | 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 | +
|
139 | 173 | If you need control over PWM frequency and the controller's built in temperature/speed |
140 | 174 | look-up table (LUT), you will need :class:`emc2101_lut.EMC2101_LUT` which extends this |
141 | 175 | class to add those features, at the cost of increased memory usage. |
@@ -282,7 +316,7 @@ def spinup_time(self, spin_time): |
282 | 316 |
|
283 | 317 | @property |
284 | 318 | def spinup_drive(self): |
285 | | - """The drive strengh of the fan on spinup in % max RPM""" |
| 319 | + """The drive strength of the fan on spinup in % max RPM""" |
286 | 320 | return self._spin_drive |
287 | 321 |
|
288 | 322 | @spinup_drive.setter |
|
0 commit comments