{ "info": { "author": "Adafruit Industries", "author_email": "circuitpython@adafruit.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries", "Topic :: System :: Hardware" ], "description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-mcp3xxx/badge/?version=latest\n :target: https://circuitpython.readthedocs.io/projects/mcp3xxx/en/latest/\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n :target: https://discord.gg/nBQh6qu\n :alt: Discord\n\n.. image:: https://travis-ci.com/adafruit/Adafruit_CircuitPython_MCP3xxx.svg?branch=master\n :target: https://travis-ci.com/adafruit/Adafruit_CircuitPython_MCP3xxx\n :alt: Build Status\n\nCircuitPython library for the MCP3xxx series of analog-to-digital converters.\n\nCurrently supports:\n\n* `MCP3008: 8-Channel 10-Bit ADC With SPI Interface `_\n\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython `_\n* `Bus Device `_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle `_.\n\nUsage Example\n=============\n\n\nMCP3008 Single Ended\n---------------------\n\n.. code-block:: python\n\n import busio\n import digitalio\n import board\n import adafruit_mcp3xxx.mcp3008 as MCP\n from adafruit_mcp3xxx.analog_in import AnalogIn\n\n # create the spi bus\n spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)\n\n # create the cs (chip select)\n cs = digitalio.DigitalInOut(board.D5)\n\n # create the mcp object\n mcp = MCP.MCP3008(spi, cs)\n\n # create an analog input channel on pin 0\n chan = AnalogIn(mcp, MCP.P0)\n\n print('Raw ADC Value: ', chan.value)\n print('ADC Voltage: ' + str(chan.voltage) + 'V')\n\n\nMCP3008 Differential\n--------------------\n\n.. code-block:: python\n\n import busio\n import digitalio\n import board\n import adafruit_mcp3xxx.mcp3008 as MCP\n from adafruit_mcp3xxx.analog_in import AnalogIn\n\n # create the spi bus\n spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)\n\n # create the cs (chip select)\n cs = digitalio.DigitalInOut(board.D5)\n\n # create the mcp object\n mcp = MCP.MCP3008(spi, cs)\n\n # create a differential ADC channel between Pin 0 and Pin 1\n chan = AnalogIn(mcp, MCP.P0, MCP.P1)\n\n print('Differential ADC Value: ', chan.value)\n print('Differential ADC Voltage: ' + str(chan.voltage) + 'V')\n\nMCP3004 Single-Ended\n---------------------\n\n.. code-block:: python\n\n import busio\n import digitalio\n import board\n import adafruit_mcp3xxx.mcp3004 as MCP\n from adafruit_mcp3xxx.analog_in import AnalogIn\n\n # create the spi bus\n spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)\n\n # create the cs (chip select)\n cs = digitalio.DigitalInOut(board.D5)\n\n # create the mcp object\n mcp = MCP.MCP3004(spi, cs)\n\n # create an analog input channel on pin 0\n chan = AnalogIn(mcp, MCP.P0)\n\n print('Raw ADC Value: ', chan.value)\n print('ADC Voltage: ' + str(chan.voltage) + 'V')\n\nMCP3004 Differential\n--------------------\n\n.. code-block:: python\n\n import busio\n import digitalio\n import board\n import adafruit_mcp3xxx.mcp3004 as MCP\n from adafruit_mcp3xxx.analog_in import AnalogIn\n\n # create the spi bus\n spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)\n\n # create the cs (chip select)\n cs = digitalio.DigitalInOut(board.D5)\n\n # create the mcp object\n mcp = MCP.MCP3004(spi, cs)\n\n # create a differential ADC channel between Pin 0 and Pin 1\n chan = AnalogIn(mcp, MCP.P0, MCP.P1)\n\n print('Differential ADC Value: ', chan.value)\n print('Differential ADC Voltage: ' + str(chan.voltage) + 'V')\n\n\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n`_\nbefore contributing to help this project stay welcoming.\n\nBuilding locally\n================\n\nZip release files\n-----------------\n\nTo build this library locally you'll need to install the\n`circuitpython-build-tools `_ package.\n\n.. code-block:: shell\n\n python3 -m venv .env\n source .env/bin/activate\n pip install circuitpython-build-tools\n\nOnce installed, make sure you are in the virtual environment:\n\n.. code-block:: shell\n\n source .env/bin/activate\n\nThen run the build:\n\n.. code-block:: shell\n\n circuitpython-build-bundles --filename_prefix adafruit-circuitpython-mcp3xxx --library_location .\n\nSphinx documentation\n-----------------------\n\nSphinx is used to build the documentation based on rST files and comments in the code. First,\ninstall dependencies (feel free to reuse the virtual environment from above):\n\n.. code-block:: shell\n\n python3 -m venv .env\n source .env/bin/activate\n pip install Sphinx sphinx-rtd-theme\n\nNow, once you have the virtual environment activated:\n\n.. code-block:: shell\n\n cd docs\n sphinx-build -E -W -b html . _build/html\n\nThis will output the documentation to ``docs/_build/html``. Open the index.html in your browser to\nview them. It will also (due to -W) error out on any warning like Travis will. This is a good way to\nlocally verify it will pass.", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx", "keywords": "adafruit mcp3xxx hardware micropython circuitpython", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "adafruit-circuitpython-mcp3xxx", "package_url": "https://pypi.org/project/adafruit-circuitpython-mcp3xxx/", "platform": "", "project_url": "https://pypi.org/project/adafruit-circuitpython-mcp3xxx/", "project_urls": { "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx" }, "release_url": "https://pypi.org/project/adafruit-circuitpython-mcp3xxx/1.1.2/", "requires_dist": null, "requires_python": "", "summary": "CircuitPython library for the MCP3xxx Analog-to-Digital converters.", "version": "1.1.2" }, "last_serial": 5971482, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "b32210b431074c2e52e2ef77996a5827", "sha256": "3528b0f11fb9d0dbf7834fda084be64adc4dec103526438caea6dc12b2ca07b7" }, "downloads": -1, "filename": "adafruit-circuitpython-mcp3xxx-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b32210b431074c2e52e2ef77996a5827", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21685, "upload_time": "2018-10-16T18:10:28", "url": "https://files.pythonhosted.org/packages/e6/dc/1827497549776da9c8bd8116976af4d582fb8683146fa17a34080ab0ef9e/adafruit-circuitpython-mcp3xxx-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "360a62ca9ee3b6082941c09570a1ab69", "sha256": "57caf6fc3ac78fdb4400430143f2cd1ec372359188ff5fa2e8890da08cf70ab7" }, "downloads": -1, "filename": "adafruit-circuitpython-mcp3xxx-1.0.2.tar.gz", "has_sig": false, "md5_digest": "360a62ca9ee3b6082941c09570a1ab69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21651, "upload_time": "2019-01-15T23:56:14", "url": "https://files.pythonhosted.org/packages/ea/d2/5f565ca0a9bad376935659da7fd526809d86a80048d243c8d29a5ca99c65/adafruit-circuitpython-mcp3xxx-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "0613b1c7c903c9ba72303d4fed8d95c9", "sha256": "ad29c9134f97a1c71ff2b26954281fe3204e6c7898c6385d24843a7861a98acb" }, "downloads": -1, "filename": "adafruit-circuitpython-mcp3xxx-1.0.3.tar.gz", "has_sig": false, "md5_digest": "0613b1c7c903c9ba72303d4fed8d95c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21730, "upload_time": "2019-03-15T20:45:46", "url": "https://files.pythonhosted.org/packages/7f/72/ebdaf1c2531a41710c3a2d608d2ee4615bd8b0ed21043090c98862f7e244/adafruit-circuitpython-mcp3xxx-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "9900a19f6ac34161dc1a607d35defd47", "sha256": "bcb8f2048138fb86f5a2b87ebdc6d6eb4cc830a33b3f9d23e1d3e4eb14822bf2" }, "downloads": -1, "filename": "adafruit-circuitpython-mcp3xxx-1.1.0.tar.gz", "has_sig": false, "md5_digest": "9900a19f6ac34161dc1a607d35defd47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21813, "upload_time": "2019-09-16T21:15:42", "url": "https://files.pythonhosted.org/packages/a9/f9/8163f7afc27a7cc353af2f060f8f8bda4c3f650b78c78313b879a82acb12/adafruit-circuitpython-mcp3xxx-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "e54894ca74a5c69c318fcc2dc94f1931", "sha256": "a008694ca93c6b0007b45f6302003ad6718a77782f0be5b3c21203c4ba835dde" }, "downloads": -1, "filename": "adafruit-circuitpython-mcp3xxx-1.1.1.tar.gz", "has_sig": false, "md5_digest": "e54894ca74a5c69c318fcc2dc94f1931", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21812, "upload_time": "2019-10-09T16:08:02", "url": "https://files.pythonhosted.org/packages/a1/f6/058857d7ff727571387b6aa1e13bbbee50ef50fb1c1c25d5504bc3b96cea/adafruit-circuitpython-mcp3xxx-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "ce68d607ed0dcb75eb9a8571d529bd00", "sha256": "80e8ddcd95ad7d709323ef36e67b377860560d7dc04f8eb5df6b682bb3f53f05" }, "downloads": -1, "filename": "adafruit-circuitpython-mcp3xxx-1.1.2.tar.gz", "has_sig": false, "md5_digest": "ce68d607ed0dcb75eb9a8571d529bd00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21819, "upload_time": "2019-10-14T13:15:57", "url": "https://files.pythonhosted.org/packages/bb/46/63260692402660b7cb1ae77082f13bb4146428126398c837df1b54ae26be/adafruit-circuitpython-mcp3xxx-1.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ce68d607ed0dcb75eb9a8571d529bd00", "sha256": "80e8ddcd95ad7d709323ef36e67b377860560d7dc04f8eb5df6b682bb3f53f05" }, "downloads": -1, "filename": "adafruit-circuitpython-mcp3xxx-1.1.2.tar.gz", "has_sig": false, "md5_digest": "ce68d607ed0dcb75eb9a8571d529bd00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21819, "upload_time": "2019-10-14T13:15:57", "url": "https://files.pythonhosted.org/packages/bb/46/63260692402660b7cb1ae77082f13bb4146428126398c837df1b54ae26be/adafruit-circuitpython-mcp3xxx-1.1.2.tar.gz" } ] }