Giter Site home page Giter Site logo

Comments (9)

drohm avatar drohm commented on July 22, 2024 2

Hi, sorry, just getting back into swing again after the holidays.

Could you try using different pins? Since you're using GPIO.BOARD, try 12 (data) and 16 (clk).

from pi-sht1x.

BLionS avatar BLionS commented on July 22, 2024 1

@poguez try connect a pull-up resistor 1k ohm between Vcc and DataPin.

PD: This work to me.

from pi-sht1x.

berkaysit avatar berkaysit commented on July 22, 2024 1

I connect 10K ohm pull-up resistor between Vcc (3.3V) and DataPin, it worked. Thank you for your advice @BLionS. I also appreciate for this great library @drohm.

from pi-sht1x.

drohm avatar drohm commented on July 22, 2024

Can you provide more information?

What specifically isn't working? What have you tried? Can you provide the output from doing pip list --format=columns at the command line? How are you using the library, which script? What error are you getting? What's the output?

from pi-sht1x.

poguez avatar poguez commented on July 22, 2024

My hardware

Hardware	: BCM2835
Revision	: a21041

Hardware wiring:

Black: ground (Pin 6)
Red: 3.3V (Pin 1)
Blue: Data (Pin 7)
Yellow: CLK (Pin 11)

pip3 list output:

automationhat (0.0.4)
blinkt (0.1.0)
Cap1xxx (0.1.3)
chardet (2.3.0)
codebug-i2c-tether (0.2.3)
codebug-tether (0.7.0)
colorama (0.3.2)
drumhat (0.0.5)
envirophat (0.0.6)
ExplorerHAT (0.4.2)
Flask (0.10.1)
fourletterphat (0.0.2)
gpiozero (1.3.2)
html5lib (0.999)
itsdangerous (0.24)
jedi (0.10.2)
Jinja2 (2.7.3)
MarkupSafe (0.23)
mcpi (0.1.1)
microdotphat (0.1.3)
mote (0.0.3)
motephat (0.0.2)
numpy (1.8.2)
pgzero (1.1)
phatbeat (0.0.2)
pi-sht1x (1.0.9)
pianohat (0.0.5)
picamera (1.13)
picraft (1.0)
pifacecommon (4.2.1)
pifacedigitalio (3.1.0)
piglow (1.2.4)
pigpio (1.35)
Pillow (2.6.1)
pip (1.5.6)
pygame (1.9.2a0)
pygobject (3.14.0)
pyinotify (0.9.4)
pyOpenSSL (0.13.1)
pyserial (2.6)
python-apt (0.9.3.12)
python-debian (0.1.27)
rainbowhat (0.0.2)
requests (2.4.3)
RPi.GPIO (0.6.3)
RTIMULib (7.2.1)
scrollphat (0.0.7)
scrollphathd (1.0.1)
sense-emu (1.0)
sense-hat (2.2.0)
setuptools (5.5.1)
six (1.8.0)
skywriter (0.0.7)
smbus (1.1)
sn3218 (1.2.7)
spidev (3.0)
thonny (2.1.10)
touchphat (0.0.1)
twython (3.1.2)
urllib3 (1.9.1)
Werkzeug (0.9.6)
wheel (0.24.0)

sudo python3 sensor.py 7 11 -g 'BOARD' output:

ERROR:root:SHT1x is not in the proper measurement state: DATA line is LOW.
ERROR:root:Exception in with block: <class 'pi_sht1x.sht1x.SHT1xError'>
SHT1x is not in the proper measurement state: DATA line is LOW.
<traceback object at 0x768d8788>
Traceback (most recent call last):
  File "sensor.py", line 56, in <module>
    main()
  File "sensor.py", line 48, in main
    temp = sensor.read_temperature()
  File "/usr/local/lib/python3.4/dist-packages/pi_sht1x-1.0.9-py3.4.egg/pi_sht1x/sht1x.py", line 166, in read_temperature
    self._send_command()
  File "/usr/local/lib/python3.4/dist-packages/pi_sht1x-1.0.9-py3.4.egg/pi_sht1x/sht1x.py", line 262, in _send_command
    raise SHT1xError(message)
pi_sht1x.sht1x.SHT1xError: SHT1x is not in the proper measurement state: DATA line is LOW.

from pi-sht1x.

poguez avatar poguez commented on July 22, 2024

Any thoughts on this?

from pi-sht1x.

poguez avatar poguez commented on July 22, 2024

No luck, same error.

from pi-sht1x.

drohm avatar drohm commented on July 22, 2024

Okay, I just tested this on my pi3 in a fresh virtualenv. I pip installed RPi.GPIO and pi-sht1x and it worked fine for me.

Command:
(pi-sht1x-dev) drohm@scifpi01:~/dev/pi-sht1x/examples$ python sensor.py 18 23 -g 'BCM'

Wiring setup:
pi-sht1x-wiring

Output:

Temperature: 25.38*C [77.64*F]
Relative Humidity: 13.84%
Dew Point: -3.99*C

Temperature: 25.38*C [77.64*F]
Relative Humidity: 13.81%
Dew Point: -4.02*C

Temperature: 25.38*C [77.64*F]
Relative Humidity: 13.81%
Dew Point: -4.02*C

Temperature: 25.38*C [77.64*F]
Relative Humidity: 13.81%
Dew Point: -4.02*C

Temperature: 25.36*C [77.61*F]
Relative Humidity: 13.81%
Dew Point: -4.04*C

Run these commands for me and paste the output:

  • uname -rv
4.9.70-v7+ #1068 SMP Mon Dec 18 22:12:55 GMT 2017
  • cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
  • lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 8.0 (jessie)
Release:        8.0
Codename:       jessie

Also, I'm not sure if this is related, but I noticed that your version of pip and setuptools is pretty old, upgrade them. My pip list output:

Package    Version
---------- -------
pi-sht1x   1.0.9  
pip        9.0.1  
RPi.GPIO   0.6.3  
setuptools 38.2.5 
wheel      0.30.0 

While you're at it, upgrade wheel as well.

from pi-sht1x.

drohm avatar drohm commented on July 22, 2024

@poguez Any updates?

from pi-sht1x.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.