adafruit_tc74
¶
CircuitPython library for the Microchip TC74 Digital Temperature Sensor
- Author(s): Bryan Siepert, Garrett Koller
Implementation Notes¶
Hardware:
- Adafruit Breadboard Friendly I2C Temperature Sensor TC74: https://www.adafruit.com/product/4375
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
-
class
adafruit_tc74.
TC74
(i2c_bus, address=72)¶ Driver for the Microchip TC74 Digital Temperature Sensor. :param ~busio.I2C i2c_bus: The I2C bus the TC74 is connected to :param int address: The I2C device address for the sensor. Default is
0x48
Quickstart: Importing and using the TC74
Here is an example of using the
TC74
class. First you will need to import the libraries to use the sensorimport board import adafruit_tc74
Once this is done you can define your
board.I2C
object and define your sensor objecti2c = board.I2C() # uses board.SCL and board.SDA tc = adafruit_tc74.TC74(i2c)
Now you have access to the temperature using
temperature
.temperature = tc.temperature
-
data_ready
¶ Read-only bit that indicates when the temperature register is ready to be read from, especially after power-on or when switching from the shutdown to the normal state.
-
shutdown
¶ Set to True to turn off the temperature measurement circuitry in the sensor. While shut down the configurations properties can still be read or written but the temperature will not be measured.
-
temperature
¶ Returns the current temperature in degrees Celsius. Resolution is 1 degrees Celsius.
-