Skip to content

Commit

Permalink
verifying_references
Browse files Browse the repository at this point in the history
  • Loading branch information
jposada202020 committed May 4, 2021
1 parent 40fa250 commit 2b9f251
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 18 deletions.
3 changes: 1 addition & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ Usage Example
import time
import board
import busio
from adafruit_emc2101 import EMC2101
i2c = busio.I2C(board.SCL, board.SDA)
i2c = board.I2C() # uses board.SCL and board.SDA
emc = EMC2101(i2c)
print("Setting fan speed to 25%")
Expand Down
16 changes: 11 additions & 5 deletions adafruit_emc2101/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
**Hardware:**
* `Adafruit EMC2101 Breakout <https://adafruit.com/product/4808>`_
* `Adafruit EMC2101 Breakout
<https://adafruit.com/product/4808>`_ (Product ID: 4808)
**Software and Dependencies:**
* Adafruit CircuitPython firmware for the supported boards:
https://github.com/adafruit/circuitpython/releases
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
https://circuitpython.org/downloads
* Adafruit's Bus Device library:
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit's Register library:
https://github.com/adafruit/Adafruit_CircuitPython_Register
"""

from micropython import const
Expand Down Expand Up @@ -282,7 +288,7 @@ def spinup_time(self, spin_time):

@property
def spinup_drive(self):
"""The drive strengh of the fan on spinup in % max RPM"""
"""The drive strength of the fan on spinup in % max RPM"""
return self._spin_drive

@spinup_drive.setter
Expand Down
12 changes: 8 additions & 4 deletions adafruit_emc2101/emc2101_lut.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@
**Hardware:**
* `Adafruit EMC2101 Breakout <https://adafruit.com/product/4808>`_
* `Adafruit EMC2101 Breakout <https://adafruit.com/product/4808>`_ (Product ID: 4808)
**Software and Dependencies:**
* Adafruit CircuitPython firmware for the supported boards:
https://github.com/adafruit/circuitpython/releases
https://circuitpython.org/downloads
* Adafruit's Bus Device library:
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit's Register library:
https://github.com/adafruit/Adafruit_CircuitPython_Register
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
The class defined here may be used instead of :class:`adafruit_emc2101.EMC2101`,
if your device has enough RAM to support it. This class adds LUT control
Expand Down
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ Table of Contents
.. toctree::
:caption: Tutorials

EMC2101 Fan Controller and Temperature sensor Learning Guide <https://learn.adafruit.com/emc2101-fan-controller-and-temperature-sensor>

.. toctree::
:caption: Related Products

EMC2101 Fan Controller and Temperature sensor <https://www.adafruit.com/product/4808>

.. toctree::
:caption: Other Links
Expand Down
3 changes: 1 addition & 2 deletions examples/emc2101_lut_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# SPDX-License-Identifier: MIT
import time
import board
import busio
from adafruit_emc2101.emc2101_lut import EMC2101_LUT as EMC2101

i2c = busio.I2C(board.SCL, board.SDA)
i2c = board.I2C() # uses board.SCL and board.SDA

FAN_MAX_RPM = 1700
emc = EMC2101(i2c)
Expand Down
3 changes: 1 addition & 2 deletions examples/emc2101_set_pwm_freq.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# SPDX-License-Identifier: MIT
import time
import board
import busio
from adafruit_emc2101.emc2101_lut import EMC2101_LUT as EMC2101

i2c = busio.I2C(board.SCL, board.SDA)
i2c = board.I2C() # uses board.SCL and board.SDA

emc = EMC2101(i2c)
emc.set_pwm_clock(use_preset=False)
Expand Down
4 changes: 1 addition & 3 deletions examples/emc2101_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
# SPDX-License-Identifier: MIT
import time
import board
import busio
from adafruit_emc2101 import EMC2101

i2c = busio.I2C(board.SCL, board.SDA)

i2c = board.I2C() # uses board.SCL and board.SDA
emc = EMC2101(i2c)
while True:
print("Setting fan speed to 25%")
Expand Down

0 comments on commit 2b9f251

Please sign in to comment.