Simple test¶
Ensure your device works with this simple test.
examples/mcp9600_simpletest.py¶
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4import time
5import board
6import busio
7import adafruit_mcp9600
8
9# frequency must be set for the MCP9600 to function.
10# If you experience I/O errors, try changing the frequency.
11i2c = busio.I2C(board.SCL, board.SDA, frequency=100000)
12mcp = adafruit_mcp9600.MCP9600(i2c)
13
14while True:
15 print((mcp.ambient_temperature, mcp.temperature, mcp.delta_temperature))
16 time.sleep(1)