adafruit / adafruit/Adafruit_CircuitPython_SHTC3

Adafruit_CircuitPython_SHTC3/examples/shtc3_simpletest.py

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9
Forks
6
PR merge metrics
No merged PRs in 30d

Description

![image](https://user-images.githubusercontent.com/37584769/148689084-a9f19bba-614c-4f1b-b4e6-deac99a2a740.png)

Hi.

Try to add sht.reset().
On my Jetson following code works without power reset.

```
import time
import board
import adafruit_shtc3

i2c = board.I2C() # uses board.SCL and board.SDA
sht = adafruit_shtc3.SHTC3(i2c)

run = True

while run:
try:
temperature, relative_humidity = sht.measurements
print("Temperature: %0.1f C" % temperature)
print("Humidity: %0.1f %%" % relative_humidity)
print("")
time.sleep(1)
except KeyboardInterrupt:
run = False

sht.reset()

print('Service stopped')
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with examples/shtc3_simpletest.py and review the example's shutdown path after KeyboardInterrupt. Update the example so the sensor reset is handled as requested, then run the example or its available checks to confirm it still reports measurements and exits cleanly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.