I've been trying to set up the SHT10 sensor from adafruit.com and have been having problems. I think I have the sensor connected properly to my raspberry pi 3 through a breadboard, however, when I run my python code I get error codes.
from pi_sht1x import SHT1x
import RPi.GPIO as GPIO
GPIO.setwarnings(False)
with SHT1x(11, 7, gpio_mode=GPIO.BOARD) as sensor:
temp = sensor.read_temperature()
humidity = sensor.read_humidity(temp)
sensor.calculate_dew_point(temp, humidity)
print("sensor")
This is the error code I get:
pi@raspberrypi:~ $ sudo python3 garden.py Traceback (most recent call last): File "garden.py", line 7, in temp = sensor.read_temperature() File "/usr/local/lib/python3.4/dist-packages/pi_sht1x/sht1x.py", line 166, in read_temperature self._send_command() File "/usr/local/lib/python3.4/dist-packages/pi_sht1x/sht1x.py", line 254, in _send_command self._get_ack(command_name) File "/usr/local/lib/python3.4/dist-packages/pi_sht1x/sht1x.py", line 397, in _get_ack raise SHT1xError(message) pi_sht1x.sht1x.SHT1xError: SHT1x failed to properly receive command [['Temperature'] - 00000011]
I'm pretty new to coding etc. So I imagine the solution is probably easy... Thanks!