A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.circuitpython.org/projects/tc74/en/latest/api.html below:

Website Navigation


API Reference — Adafruit TC74 Library 1.0 documentation

API Reference adafruit_tc74

CircuitPython library for the Microchip TC74 Digital Temperature Sensor

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_tc74.TC74(i2c_bus: I2C, address: int = 72)

Driver for the Microchip TC74 Digital Temperature Sensor.

Parameters:
  • i2c_bus (I2C) – The I2C bus the TC74 is connected to

  • address (int) – 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 sensor

import board
import adafruit_tc74

Once this is done you can define your board.I2C object and define your sensor object

i2c = 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.

property temperature: int

Returns the current temperature in degrees Celsius. Resolution is 1 degrees Celsius.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4