{ "info": { "author": "Nick Crews", "author_email": "nicholas.b.crews@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Utilities" ], "description": "[![MS5803-14BA](ms5803.jpg)](https://www.sparkfun.com/products/12909)\n\n# ms5803py\nPython 3 library for MS5803-14BA pressure sensor for Raspberry Pi over i2c.\n\nBased off of the [Adafruit Arduino Library](https://github.com/sparkfun/MS5803-14BA_Breakout) and the [Control Everything Python Library](https://github.com/ControlEverythingCommunity/MS5803-14BA). Some of the math is complicated when correcting raw readings to actual temperatures and pressures, that math can be verified from the [MS5803-14BA datasheet](http://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Data+Sheet%7FMS5803-14BA%7FB3%7Fpdf%7FEnglish%7FENG_DS_MS5803-14BA_B3.pdf%7FCAT-BLPS0013).\n\nSupports reading the pressure and temperature values from the sensor at any of the supported OverSampling Rates (OSR). A higher OSR leads to greater resolution/accuracy but requires a longer conversion time. The supported OSR rates are [256, 512, 1024, 2048, 4096], also available at `MS5803.OSRs`.\n\n## Installation\nAvailable on PyPi, so you can install on your RPi using\n````\npip3 install ms5803py\n````\nor clone this repository and run\n```\npython3 setup.py install\n```\n\n## Usage\nThe MS5803 and the RPi use the I2C protocol to communicate, so you need to have I2C set up on your pi, as explained in [this Adafruit tutorial](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c). After that, the MS5803 needs to be hooked up to the Raspberry Pi as described in [this Adafruit tutorial](https://learn.sparkfun.com/tutorials/ms5803-14ba-pressure-sensor-hookup-guide).\n\nAfter doing that, you must find the I2C address of your MS5803. To do this, run the following command both before and after plugging in the MS5803. Whatever address shows up is the one you want:\n```\nsudo i2cdetect -y 1\n````\nIt should be either `0X76` or `0x77`, as described in the [MS5803-14BA datasheet](http://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Data+Sheet%7FMS5803-14BA%7FB3%7Fpdf%7FEnglish%7FENG_DS_MS5803-14BA_B3.pdf%7FCAT-BLPS0013), depending on if the CSB (Chip Select) pin on the MS5803 is high or low. On the [Sparkfun breakout board](https://www.sparkfun.com/products/12909) the I2C address is `0x76`, so I have that set as the default if you don't specify an address when initializing the sensor.\n\nSee `python3 example.py` for an example of usage:\n```\nimport ms5803py\nimport time\n\ns = ms5803py.MS5803()\nwhile True:\n # Do the batteries-included version, optionally specifying an OSR.\n press, temp = s.read(pressure_osr=512)\n print(\"quick'n'easy pressure={} mBar, temperature={} C\".format(press, temp))\n\n # Use the raw reads for more control, e.g. you need a faster sample\n # rate for pressure than for temperature. Use a high OverSampling Rate (osr)\n # value for a slow but accurate temperature read, and a low osr value\n # for quick and inaccurate pressure readings.\n raw_temperature = s.read_raw_temperature(osr=4096)\n for i in range(5):\n raw_pressure = s.read_raw_pressure(osr=256)\n press, temp = s.convert_raw_readings(raw_pressure, raw_temperature)\n print(\"advanced pressure={} mBar, temperature={} C\".format(press, temp))\n time.sleep(1)\n```\nresults in:\n```\nquick'n'easy pressure=835.7 mBar, temperature=26.64 C\nadvanced pressure=835.3 mBar, temperature=26.64 C\nadvanced pressure=834.2 mBar, temperature=26.64 C\nadvanced pressure=835.3 mBar, temperature=26.64 C\nadvanced pressure=834.2 mBar, temperature=26.64 C\nadvanced pressure=834.2 mBar, temperature=26.64 C\nquick'n'easy pressure=835.1 mBar, temperature=26.65 C\nadvanced pressure=835.3 mBar, temperature=26.63 C\nadvanced pressure=837.7 mBar, temperature=26.63 C\nadvanced pressure=834.2 mBar, temperature=26.63 C\nadvanced pressure=831.8 mBar, temperature=26.63 C\nadvanced pressure=835.3 mBar, temperature=26.63 C\n...\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/NickCrews/ms5803py", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ms5803py", "package_url": "https://pypi.org/project/ms5803py/", "platform": "", "project_url": "https://pypi.org/project/ms5803py/", "project_urls": { "Homepage": "https://github.com/NickCrews/ms5803py" }, "release_url": "https://pypi.org/project/ms5803py/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Python library for MS5803-14BA pressure sensor for Raspberry Pi over i2c", "version": "1.0.0" }, "last_serial": 5455468, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "75f9b2524867f9277215c8241667340b", "sha256": "c1ff185a87c22f3ec820cd29e3f01b3b2ea2bed29118ebd593f974e8c71c6f38" }, "downloads": -1, "filename": "ms5803py-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "75f9b2524867f9277215c8241667340b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3710, "upload_time": "2018-07-31T01:10:09", "url": "https://files.pythonhosted.org/packages/6e/e7/1589e6365544bf1e8f3cd7eb67e0e107106b48c89c165fbfeea9ec041b93/ms5803py-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1e3a44df9fd97a2444c5536014017205", "sha256": "a2b7152377825deeee1d5d3dad7ef951cc199034ddceae4e074c6dfbe8434cb1" }, "downloads": -1, "filename": "ms5803py-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1e3a44df9fd97a2444c5536014017205", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3377, "upload_time": "2018-07-31T01:10:13", "url": "https://files.pythonhosted.org/packages/47/ae/5b0857682d03707636896a27626be72d1926999b099b5aa7004846b9bb73/ms5803py-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "c0b62a42ed363fb2eb7de0f9d7b867f3", "sha256": "7ef04f8425eb6dad3740c405099ae6a83a08847ed47197894c11bfddaa4909e1" }, "downloads": -1, "filename": "ms5803py-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "c0b62a42ed363fb2eb7de0f9d7b867f3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4524, "upload_time": "2019-06-19T02:34:53", "url": "https://files.pythonhosted.org/packages/9a/36/e387b95f5c3c43407869aa1bac715464956f2f79a02b70a7f218e39d297a/ms5803py-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f0f1e47f4246a50b63a9d60e3a059ea", "sha256": "710b363129ffb7cf74e12de560eb820cb38078c598451879588f29ac0f9ef756" }, "downloads": -1, "filename": "ms5803py-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5f0f1e47f4246a50b63a9d60e3a059ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3383, "upload_time": "2019-06-19T02:34:55", "url": "https://files.pythonhosted.org/packages/9e/9d/b03df0783359908d08834a7103b5eaa2ffd3cb7eb19273e95c3d3df3e444/ms5803py-0.1.5.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "858671b139ba033cbd31b1f0feac7a44", "sha256": "f4c7e2c6b0191d5772e4ed6bfe800e360dc0975aadbfd7b091dcdb4aaf339533" }, "downloads": -1, "filename": "ms5803py-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "858671b139ba033cbd31b1f0feac7a44", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8243, "upload_time": "2019-06-27T07:18:08", "url": "https://files.pythonhosted.org/packages/2a/ea/4929914787bc369494cff84e1fe3e60c4eff1650ff62d492f302c84a24a0/ms5803py-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84870ddf89ba3005e26dbb882db21da1", "sha256": "ed68e032e8193904355e08e537e79acc277c9a1b07f2886126e187410f98bde0" }, "downloads": -1, "filename": "ms5803py-1.0.0.tar.gz", "has_sig": false, "md5_digest": "84870ddf89ba3005e26dbb882db21da1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5623, "upload_time": "2019-06-27T07:18:10", "url": "https://files.pythonhosted.org/packages/a5/8e/96c92b91c359a931b81b2c03b9e09df4f4a611e90b5d777691172dc317dc/ms5803py-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "858671b139ba033cbd31b1f0feac7a44", "sha256": "f4c7e2c6b0191d5772e4ed6bfe800e360dc0975aadbfd7b091dcdb4aaf339533" }, "downloads": -1, "filename": "ms5803py-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "858671b139ba033cbd31b1f0feac7a44", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8243, "upload_time": "2019-06-27T07:18:08", "url": "https://files.pythonhosted.org/packages/2a/ea/4929914787bc369494cff84e1fe3e60c4eff1650ff62d492f302c84a24a0/ms5803py-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84870ddf89ba3005e26dbb882db21da1", "sha256": "ed68e032e8193904355e08e537e79acc277c9a1b07f2886126e187410f98bde0" }, "downloads": -1, "filename": "ms5803py-1.0.0.tar.gz", "has_sig": false, "md5_digest": "84870ddf89ba3005e26dbb882db21da1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5623, "upload_time": "2019-06-27T07:18:10", "url": "https://files.pythonhosted.org/packages/a5/8e/96c92b91c359a931b81b2c03b9e09df4f4a611e90b5d777691172dc317dc/ms5803py-1.0.0.tar.gz" } ] }