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: I2C, address: int = 72)¶
Driver for the Microchip TC74 Digital Temperature Sensor.
- Parameters:
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 = 1¶
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 = 1¶
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.