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
 9# i2c = board.STEMMA_I2C()  # For using the built-in STEMMA QT connector on a microcontroller
10sht = adafruit_shtc3.SHTC3(i2c)
11
12while True:
13    temperature, relative_humidity = sht.measurements
14    print("Temperature: %0.1f C" % temperature)
15    print("Humidity: %0.1f %%" % relative_humidity)
16    print("")
17    time.sleep(1)