{ "info": { "author": "Doug Rohm", "author_email": "pypi@drohm.sent.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Manufacturing", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3 :: Only", "Topic :: Home Automation", "Topic :: Scientific/Engineering :: Atmospheric Science", "Topic :: Software Development", "Topic :: System :: Hardware :: Hardware Drivers", "Topic :: System :: Monitoring", "Topic :: System :: Operating System Kernels :: Linux", "Topic :: Utilities" ], "description": "********\npi-sht1x\n********\nThe pi-sht1x package is a Python 3 library used to communicate and control the Sensirion SHT1x series of temperature and humidity sensors. It was designed to be used primarily with the Raspberry Pi and depends on the `RPi.GPIO`_ library.\n\nSHT1x (including SHT10, SHT11 and SHT15) is Sensirion's family of surface mountable relative humidity and temperature sensors. The sensors integrate sensor elements plus signal processing on a tiny foot print and provide a fully calibrated digital output. A unique capacitive sensor element is used for measuring relative humidity while temperature is measured by a band-gap sensor.\n\nThe package was tested using the Raspberry Pi B+ and Raspberry Pi 2. There shouldn't be issues running this on the older models, but no guarantees. If you do run into any problems, please let me know or create an `issue`_ on the GitHub project page:\n\n::\n\n https://github.com/drohm/pi-sht1x\n\nThe data sheet for the SHT1x series of sensors can be found here:\n\n::\n\n http://bit.ly/1Pafs6j\n\nThis library provides the following functionality:\n\n\n* Taking temperature measurements\n* Taking humidity measurements\n* Make dew point calculations\n* Change the supplied voltage (5V, 4V, 3.5V, 3V, 2.5V)\n* Enable or disable CRC checking\n* Reading the Status Register\n* Writing to the Status Register, provides the following functionality:\n* Turn ``otp_no_reload`` on (will save about 10ms per measurement)\n* Turn on the internal heater element (for functionality analysis, refer to the data sheet list above for more information)\n* Change the resolution of measurements, High (14-bit temperature and 12-bit humidity) or Low (12-bit temperature and 8-bit humidity)\n\n\nInstallation\n============\nInstallation is pretty simple:\n\n::\n\n pip3 install pi-sht1x\n\nNote that to install packages into the system-wide PATH and site-packages, elevated privileges are often required (sudo). You can try using ``install -user`` or `virtualenv`_ to do unprivileged installs.\n\n\nUsage\n=====\nWhen instantiating a SHT1x object, the following default values are used if not specified:\n\n::\n\n gpio_mode: GPIO.BOARD\n vdd: 3.5V\n resolution: High (14-bit temperature & 12-bit humidity)\n heater: False\n otp_no_reload: False\n crc_check: True\n\nCommand Line - REPL\n-------------------\nYou can invoke the SHT1x class directly from the REPL. In order to use the library you need to import the package:\n\n::\n\n from pi_sht1x import SHT1x\n\nNow you can create the sensor object and take measurements:\n\n::\n\n with SHT1x(18, 23, gpio_mode=GPIO.BCM) as sensor:\n temp = sensor.read_temperature()\n humidity = sensor.read_humidity(temp)\n sensor.calculate_dew_point(temp, humidity)\n print(sensor)\n\nThis will create the SHT1x object using ``data_pin=18``, ``sck_pin=23``, ``gpio_mode=GPIO.BCM``, and default values for ``vdd`` (3.5V), ``resolution`` (High), ``heater`` (False), ``otp_no_reload`` (False), and ``crc_check`` (True). The output will look something like this:\n\n::\n\n Temperature: 24.05*C [75.25*F]\n Humidity: 22.80%\n Dew Point: 1.38*C\n\nNote that this library should be used with a context manager like the ``with`` statement. Using it with a context manager will allow the program to properly clean up after itself and reset the GPIO pins back to default states.\n\nexamples.py\n-----------\nThis script, located in the examples folder, includes several ways to use the SHT1x class to take temperature, humidity, and dew point measurements. In order to use the script, be sure to update the ``DATA_PIN`` and ``SCK_PIN`` constants near the top of the file with the pin numbers you're using locally in your setup:\n\n::\n\n DATA_PIN = 18\n SCK_PIN = 23\n\nBased on the fact that the data sheet recommends 3.3V to power the sensor, the default voltage, if not specified when instantiating the object, is 3.5V. If you're using 5V to power the sensor, be sure to set that value when creating the object. To run the script:\n\n::\n\n sudo python3 examples/examples.py\n\nRunning the script exercises all of the functionality for the sensor. Be sure to look through the script to see what you can do and how to customize using the sensor. Sample output:\n\n::\n\n $ sudo python3 examples/examples.py\n Test: using default values: 3.5V, High resolution, no heater, otp_no_reload off, CRC checking enabled...\n Temperature: 24.49*C [76.04*F]\n Humidity: 20.68%\n Dew Point: 0.47*C\n \n Temperature: 24.48*C [76.02*F]\n Humidity: 20.68%\n Dew Point: 0.46*C\n \n Temperature: 24.47*C [76.01*F]\n Humidity: 20.68%\n Dew Point: 0.45*C\n \n Temperature: 24.51*C [76.06*F]\n Humidity: 20.68%\n Dew Point: 0.47*C\n \n Temperature: 24.51*C [76.06*F]\n Humidity: 20.68%\n Dew Point: 0.47*C\n Test complete.\n \n Test: reading all measurements using GPIO.BCM mode, 3V, High resolution, heater off, otp_no_reload off, and CRC check on.\n Temperature: 24.48*C [76.02*F]\n Humidity: 20.61%\n Dew Point: 0.42*C\n \n Temperature: 24.46*C [75.98*F]\n Humidity: 20.61%\n Dew Point: 0.40*C\n \n Temperature: 24.46*C [75.98*F]\n Humidity: 20.61%\n Dew Point: 0.40*C\n \n Temperature: 24.48*C [76.02*F]\n Humidity: 20.68%\n Dew Point: 0.46*C\n \n Temperature: 24.48*C [76.02*F]\n Humidity: 20.65%\n Dew Point: 0.44*C\n Test complete.\n .\n .\n .\n\nThe `RPi.GPIO`_ module requires root privileges in order to communicate with the GPIO pins on the Raspberry Pi so you need to run your scripts as root (sudo).\n\nsensor.py\n---------\nThis script is callable from the terminal and the sensor parameters are passed into the script.\n\n::\n\n sudo python3 sensor.py 18 23 -g 'BCM'\n\nThis executes the sensor script using ``data_pin=18``, ``sck_pin=23``, and ``gpio_mode=GPIO.BCM``. The script will then create an instance of the SHT1x class and read in the temperature, humidity, and calculate the dew point five times, sleeping 2 seconds in between each measurement. The output will looks something like this:\n\n::\n\n $ sudo python3 examples/sensor.py 18 23 -g 'BCM'\n Temperature: 24.05*C [75.25*F]\n Humidity: 22.79%\n Dew Point: 1.37*C\n \n Temperature: 24.03*C [75.21*F]\n Humidity: 22.79%\n Dew Point: 1.36*C\n \n Temperature: 24.01*C [75.16*F]\n Humidity: 22.79%\n Dew Point: 1.33*C\n \n Temperature: 24.01*C [75.17*F]\n Humidity: 22.86%\n Dew Point: 1.38*C\n \n Temperature: 24.02*C [75.19*F]\n Humidity: 22.86%\n Dew Point: 1.39*C\n\nTo get a listing of all the parameters you can provide to the script, use `python3 sensor.py -h` for help:\n\n::\n\n $ sudo python3 examples/sensor.py -h\n usage: sensor.py [-h] [-g {BCM,BOARD}] [-v {5V,4V,3.5V,3V,2.5V}]\n [-r {HIGH,LOW}] [-e] [-o] [-c]\n data-pin sck-pin\n \n Reads the temperature and relative humidity from the SHT1x series of sensors\n using the pi_sht1x library.\n \n positional arguments:\n data-pin Data pin used to connect to the sensor.\n sck-pin SCK pin used to connect to the sensor.\n \n optional arguments:\n -h, --help show this help message and exit\n -g {BCM,BOARD}, --gpio-mode {BCM,BOARD}\n RPi.GPIO mode used, either GPIO.BOARD or GPIO.BCM.\n Defaults to GPIO.BCM.\n -v {5V,4V,3.5V,3V,2.5V}, --vdd {5V,4V,3.5V,3V,2.5V}\n Voltage used to power the sensor. Defaults to 3.5V.\n -r {HIGH,LOW}, --resolution {HIGH,LOW}\n Resolution used by the sensor, 14/12-bit or 12-8-bit.\n Defaults to High.\n -e, --heater Used to turn the internal heater on (used for\n calibration).\n -o, --otp-no-reload Used to enable OTP no reload, will save about 10ms per\n measurement.\n -c, --no-crc-check Performs CRC checking.\n\n\nCredits\n=======\nThis module was done for fun and to learn how to communicate with serial devices using Python and the Raspberry Pi. I referred to the following projects from time to time when I hit a stumbling block (there were many...):\n\n* `Jonathan Oxer`_ \n* `Luca Nobili`_ \n\n.. _RPi.GPIO: http://pypi.python.org/pypi/RPi.GPIO\n.. _issue: https://github.com/drohm/pi-sht1x/issues\n.. _virtualenv: https://pypi.python.org/pypi/virtualenv\n.. _Jonathan Oxer: https://github.com/practicalarduino/SHT1x\n.. _Luca Nobili: https://bitbucket.org/lunobili/rpisht1x", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/drohm/pi-sht1x/releases/tag/1.0.9", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/drohm/pi-sht1x", "keywords": "sht,sensor,sht1x,sensirion,T,temperature,humidity,RH,dew point,celsius,measurement,gpio,serial,2-wire,crc,crc-8hardware,driver,ic", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "Pi-Sht1x", "package_url": "https://pypi.org/project/Pi-Sht1x/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Pi-Sht1x/", "project_urls": { "Download": "https://github.com/drohm/pi-sht1x/releases/tag/1.0.9", "Homepage": "https://github.com/drohm/pi-sht1x" }, "release_url": "https://pypi.org/project/Pi-Sht1x/1.0.9/", "requires_dist": null, "requires_python": null, "summary": "Python 3 library for Sensirion SHT1x series of temperature & humidity sensors for the Raspberry Pi.", "version": "1.0.9" }, "last_serial": 2400792, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e0171c045fd9a4f7226639ace1b000b4", "sha256": "3a7ef9c56ae4f0a7f45f2004f169a82f5e2e4d55a4c631db9336790118fa4a09" }, "downloads": -1, "filename": "Pi-Sht1x-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e0171c045fd9a4f7226639ace1b000b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15021, "upload_time": "2015-04-05T18:18:18", "url": "https://files.pythonhosted.org/packages/85/08/f190cfa4b17dcaf3d77c78f869e6b75a2f1635034113b5ef2ffda12ccd84/Pi-Sht1x-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "14489e3aefead9c9fe7d5a26cf90dfdd", "sha256": "1bc9eddb22eb90391144df399931cc213a53a5ca04ca1e3aa819254edef85b09" }, "downloads": -1, "filename": "Pi-Sht1x-1.0.1.tar.gz", "has_sig": false, "md5_digest": "14489e3aefead9c9fe7d5a26cf90dfdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15045, "upload_time": "2015-04-05T19:06:08", "url": "https://files.pythonhosted.org/packages/fb/dd/7649d9fbc72846a0fe36f015dbe5ddc784f260fe2d57d564409e5541ba37/Pi-Sht1x-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "c1908d2ec4fd7a89990c40be1c87adf9", "sha256": "1a6b61cea0cb24ba7db53bee28fb7f618a4cee09334059dea75916ea4fce8cc2" }, "downloads": -1, "filename": "pi-sht1x-1.0.2.tar.gz", "has_sig": false, "md5_digest": "c1908d2ec4fd7a89990c40be1c87adf9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13057, "upload_time": "2015-04-07T17:38:39", "url": "https://files.pythonhosted.org/packages/27/e4/afa909f597897d6e0fee732c2cb49e47ae04528a5313fdd8532af6f2fdee/pi-sht1x-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "cc33b5b035ec9160d4558207985f371c", "sha256": "04a1e1e9c438d12bb0ccb23bfbb15fbf617bb022724f697b0e4c07121261d627" }, "downloads": -1, "filename": "pi-sht1x-1.0.3.tar.gz", "has_sig": false, "md5_digest": "cc33b5b035ec9160d4558207985f371c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15356, "upload_time": "2015-04-07T17:41:13", "url": "https://files.pythonhosted.org/packages/ef/e3/3200d86951b7dc951683a09d6e3a18b045b5f6b9b29b5a31a44cf9281bfc/pi-sht1x-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "84d0f859789921d9d723c4179e3f3312", "sha256": "b9e024c8a0eb4c93e9c505b614fd5b28c7f3a1abc67b3d7f1b946659a0e206f0" }, "downloads": -1, "filename": "pi-sht1x-1.0.4.tar.gz", "has_sig": false, "md5_digest": "84d0f859789921d9d723c4179e3f3312", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13582, "upload_time": "2015-04-07T19:11:30", "url": "https://files.pythonhosted.org/packages/e6/9a/62847eb75ca9b2260250497b77a7abfb4e7d186ed40bfd4b5c94f9a72b3e/pi-sht1x-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "0c3c21262b41817ba069096fa3431166", "sha256": "3de13b4312c4127111008cfa8f06cf6ec2785917f569c29498a06943098590ae" }, "downloads": -1, "filename": "pi-sht1x-1.0.5.tar.gz", "has_sig": false, "md5_digest": "0c3c21262b41817ba069096fa3431166", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13706, "upload_time": "2015-04-08T01:22:38", "url": "https://files.pythonhosted.org/packages/5c/8a/efe5b7f858c7298203fadae7fb45a759598f562226f42ef09a487c2f826f/pi-sht1x-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "b6b90edaa87dfecf89f665440b89dd51", "sha256": "bbd9e41155cb6527f12e7d7eee09b3ca06aa61a71a7f52fa1babec63fb57ee84" }, "downloads": -1, "filename": "pi-sht1x-1.0.6.tar.gz", "has_sig": false, "md5_digest": "b6b90edaa87dfecf89f665440b89dd51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11757, "upload_time": "2015-04-09T01:10:50", "url": "https://files.pythonhosted.org/packages/5d/47/12f48e1d58496c4ea6a4b48b98bf5f37464df61d9580086ddd3d80ce5e4d/pi-sht1x-1.0.6.tar.gz" } ], "1.0.7": [], "1.0.8": [ { "comment_text": "", "digests": { "md5": "bebd773293284136474ad87778ea29bc", "sha256": "578a0c9cc3e8c1d59b21ed10a65cd111843d79555c57cc9be1194323badf8ba3" }, "downloads": -1, "filename": "pi-sht1x-1.0.8.tar.gz", "has_sig": false, "md5_digest": "bebd773293284136474ad87778ea29bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12989, "upload_time": "2015-04-28T15:36:53", "url": "https://files.pythonhosted.org/packages/98/c8/dc1e7616a5cace4f4cd80f576e81b04f04d0703436b2d43d94d3b9f2714e/pi-sht1x-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "14927e6709cb1f63ecbf9e8b8926da93", "sha256": "400819cdcbd63a3c00a91add50ec431cf698de1c4da30e95f3b554a6c32bfac5" }, "downloads": -1, "filename": "pi-sht1x-1.0.9.tar.gz", "has_sig": false, "md5_digest": "14927e6709cb1f63ecbf9e8b8926da93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14297, "upload_time": "2016-10-15T06:17:12", "url": "https://files.pythonhosted.org/packages/b9/ea/bb53c11f75124aadad0dc3b970fe0323000ae288d3bc74521564b5fcdc9b/pi-sht1x-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "14927e6709cb1f63ecbf9e8b8926da93", "sha256": "400819cdcbd63a3c00a91add50ec431cf698de1c4da30e95f3b554a6c32bfac5" }, "downloads": -1, "filename": "pi-sht1x-1.0.9.tar.gz", "has_sig": false, "md5_digest": "14927e6709cb1f63ecbf9e8b8926da93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14297, "upload_time": "2016-10-15T06:17:12", "url": "https://files.pythonhosted.org/packages/b9/ea/bb53c11f75124aadad0dc3b970fe0323000ae288d3bc74521564b5fcdc9b/pi-sht1x-1.0.9.tar.gz" } ] }