Skip to content

Remove unnecessary pylint disable, use board.I2C() in simpletest. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions adafruit_tc74.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,20 @@

__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_TC74.git"
# pylint: disable=bad-whitespace, too-few-public-methods
# pylint: disable=too-few-public-methods
TC74_DEFAULT_ADDRESS = 0x48

TC74_REGISTER_TEMP = 0 # Temperature register (read-only)
TC74_REGISTER_CONFIG = 1 # Configuration register
TC74_SHUTDOWN_BIT = 7 # Shutdown bit in Configuration register
TC74_DATA_READY_BIT = 6 # Data Ready bit in Configuration register


# pylint: enable=bad-whitespace, too-few-public-methods
# pylint: enable=too-few-public-methods


class TC74:
"""
Driver for the Microchip TC74 Digital Temperature Sensor.
:param ~busio.I2C i2c_bus: The I2C bus the TC74 is connected to.
:param i2c_bus: The I2C bus the TC74 is connected to.
:param address: The I2C device address for the sensor. Default is
``0x48``.
"""
Expand Down
3 changes: 1 addition & 2 deletions examples/tc74_simpletest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import time
import board
import busio
import adafruit_tc74

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

tc = adafruit_tc74.TC74(i2c)

Expand Down