{ "info": { "author": "Yang Deokgyu", "author_email": "secugyu@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Note\n~~~~\n\nThis is an unofficial port of Gordon's WiringPi library. Please do not\nemail Gordon if you have issues, he will not be able to help.\n\nFor support, comments, questions, etc please join the WiringPi Discord\nchannel: https://discord.gg/SM4WUVG\n\nWiringPi for Python\n===================\n\nWiringPi: An implementation of most of the Arduino Wiring functions for\nthe Raspberry Pi.\n\nWiringPi implements new functions for managing IO expanders.\n\nQuick Install\n=============\n\n.. image:: https://badge.fury.io/py/odroid-wiringpi.svg\n :alt: PyPI version badge\n :target: https://badge.fury.io/py/odroid-wiringpi\n\nThe library is packaged on PyPI and can be installed with pip:\n\n``pip install odroid-wiringpi``\n\nUsage\n=====\n\n.. code:: python\n\n import odroid_wiringpi as wiringpi\n\n # One of the following MUST be called before using IO functions:\n wiringpi.wiringPiSetup() # For sequential pin numbering\n # OR\n wiringpi.wiringPiSetupSys() # For /sys/class/gpio with GPIO pin numbering\n # OR\n wiringpi.wiringPiSetupGpio() # For GPIO pin numbering\n\n**General IO:**\n\n.. code:: python\n\n wiringpi.pinMode(6, 1) # Set pin 6 to 1 ( OUTPUT )\n wiringpi.digitalWrite(6, 1) # Write 1 ( HIGH ) to pin 6\n wiringpi.digitalRead(6) # Read pin 6\n\n**Setting up a peripheral:**\n\nWiringPi supports expanding your range of available \"pins\" by setting up\na port expander. The implementation details of your port expander will\nbe handled transparently, and you can write to the additional pins\n(starting from PIN\\_OFFSET >= 64) as if they were normal pins on the Pi.\n\n.. code:: python\n\n wiringpi.mcp23017Setup(PIN_OFFSET, I2C_ADDR)\n\nThis example was tested on a quick2wire board with one digital IO\nexpansion board connected via I2C:\n\n.. code:: python\n\n wiringpi.mcp23017Setup(65, 0x20)\n wiringpi.pinMode(65, 1)\n wiringpi.digitalWrite(65, 1)\n\n**Soft Tone:**\n\nHook a speaker up to your Pi and generate music with softTone. Also\nuseful for generating frequencies for other uses such as modulating A/C.\n\n.. code:: python\n\n wiringpi.softToneCreate(PIN)\n wiringpi.softToneWrite(PIN, FREQUENCY)\n\n**Bit shifting:**\n\n.. code:: python\n\n wiringpi.shiftOut(1, 2, 0, 123) # Shift out 123 (b1110110, byte 0-255) to data pin 1, clock pin 2\n\n**Serial:**\n\n.. code:: python\n\n serial = wiringpi.serialOpen('/dev/ttyAMA0', 9600) # Requires device/baud and returns an ID\n wiringpi.serialPuts(serial, \"hello\")\n wiringpi.serialClose(serial) # Pass in ID\n\n**SPI:**\n\nThe ``wiringPiSPIDataRW()`` function needs to be passed a ``bytes``\nobject in Python 3. In Python 2, it takes a string. The following should\nwork in either Python 2 or 3:\n\n.. code:: python\n\n wiringpi.wiringPiSPISetup(channel, speed)\n buf = bytes([your data here])\n retlen, retdata = wiringpi.wiringPiSPIDataRW(0, buf)\n\nNow, ``retlen`` will contain the number of bytes received/read by the\ncall. ``retdata`` will contain the data itself, and in Python 3, ``buf``\nwill have been modified to contain it as well (that won't happen in\nPython 2, because then ``buf`` is a string, and strings are immutable).\n\n**Full details of the API at:** http://www.wiringpi.com\n\nManual Build\n============\n\nGet/setup repo\n--------------\n\n.. code:: bash\n\n git clone --recursive https://github.com/WiringPi/WiringPi-Python.git\n cd WiringPi-Python\n\nDon't forget the ``--recursive``; it is required to also pull in the\nWiringPi C code from its own repository.\n\nPrerequisites\n-------------\n\nTo rebuild the bindings you **must** first have installed ``swig``,\n``python-dev``, and ``python-setuptools`` (or their ``python3-``\nequivalents). WiringPi should also be installed system-wide for access\nto the ``gpio`` tool.\n\n.. code:: bash\n\n sudo apt-get install python-dev python-setuptools swig wiringpi\n\nBuild & install with\n--------------------\n\n``sudo python setup.py install``\n\nOr Python 3:\n\n``sudo python3 setup.py install``", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hardkernel/WiringPi2-Python", "keywords": "", "license": "LGPL", "maintainer": "", "maintainer_email": "", "name": "odroid-wiringpi", "package_url": "https://pypi.org/project/odroid-wiringpi/", "platform": "", "project_url": "https://pypi.org/project/odroid-wiringpi/", "project_urls": { "Homepage": "https://github.com/hardkernel/WiringPi2-Python" }, "release_url": "https://pypi.org/project/odroid-wiringpi/2.44.5.0/", "requires_dist": null, "requires_python": "", "summary": "A Port of WiringPi Python project for ODROID boards", "version": "2.44.5.0" }, "last_serial": 5860778, "releases": { "2.44.4.0": [ { "comment_text": "", "digests": { "md5": "3f44456d2b0ecf5758f7edc2b10802aa", "sha256": "eeca7ed1297f1f2414b3b8c6fcede1473cad35c3c927b72f7c6ad83569ff2ad9" }, "downloads": -1, "filename": "odroid_wiringpi-2.44.4.0.tar.gz", "has_sig": false, "md5_digest": "3f44456d2b0ecf5758f7edc2b10802aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 150402, "upload_time": "2019-09-04T02:26:11", "url": "https://files.pythonhosted.org/packages/27/bd/012018b5fbc359dcdbf10269078b96d14f85354397127466b5eab5be0d05/odroid_wiringpi-2.44.4.0.tar.gz" } ], "2.44.5.0": [ { "comment_text": "", "digests": { "md5": "f83b02be92657ca8ac72b138d5acb002", "sha256": "fe4efb0e680168c5d87ccb1503be5788118c22892500d77c035915ab3f789b6e" }, "downloads": -1, "filename": "odroid_wiringpi-2.44.5.0.tar.gz", "has_sig": false, "md5_digest": "f83b02be92657ca8ac72b138d5acb002", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 150404, "upload_time": "2019-09-20T08:31:46", "url": "https://files.pythonhosted.org/packages/37/54/d06c477b11e0acdc7a21ce7d51a79bb073239ee4feb2aede07ea6fcaedb1/odroid_wiringpi-2.44.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f83b02be92657ca8ac72b138d5acb002", "sha256": "fe4efb0e680168c5d87ccb1503be5788118c22892500d77c035915ab3f789b6e" }, "downloads": -1, "filename": "odroid_wiringpi-2.44.5.0.tar.gz", "has_sig": false, "md5_digest": "f83b02be92657ca8ac72b138d5acb002", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 150404, "upload_time": "2019-09-20T08:31:46", "url": "https://files.pythonhosted.org/packages/37/54/d06c477b11e0acdc7a21ce7d51a79bb073239ee4feb2aede07ea6fcaedb1/odroid_wiringpi-2.44.5.0.tar.gz" } ] }