Simple test¶
Ensure your device works with this simple test.
examples/shtc3_simpletest.py¶
1# SPDX-FileCopyrightText: Copyright (c) 2020 Bryan Siepert for Adafruit Industries
2#
3# SPDX-License-Identifier: MIT
4import time
5import board
6import adafruit_shtc3
7
8i2c = board.I2C() # uses board.SCL and board.SDA
9sht = adafruit_shtc3.SHTC3(i2c)
10
11while True:
12 temperature, relative_humidity = sht.measurements
13 print("Temperature: %0.1f C" % temperature)
14 print("Humidity: %0.1f %%" % relative_humidity)
15 print("")
16 time.sleep(1)