{ "info": { "author": "Somatic Labs", "author_email": "developers@somaticlabs.io", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Topic :: Scientific/Engineering :: Human Machine Interfaces" ], "description": "# ZorbPy\n\n*Python library for integrating with the [Somatic Zorb Engine](https://zorbtouch.com)*\n\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/SomaticLabs/ZorbPy/blob/master/LICENSE)\n[![Twitter](https://img.shields.io/badge/twitter-@SomaticLabs-orange.svg?style=flat)](http://twitter.com/SomaticLabs)\n\n## Installation\n\nFirst install the [Adafruit BluefruitLE library](https://github.com/adafruit/Adafruit_Python_BluefruitLE).\n\nPlease note that this library only currently supports macOS and Linux, as Windows is not currently supported by the [underlying BLE](https://github.com/adafruit/Adafruit_Python_BluefruitLE) package used for this library.\n\nAfter installing the BluefruitLE library, installation of ZorbPy using [pip](https://pypi.org/project/pip/) is simple:\n\n```sh\npip install zorb\n```\n\n\n## Library Usage\n\nFor a quick example on how to use the ZorbPy library, please reference [example.py](https://github.com/SomaticLabs/ZorbPy/blob/master/example.py).\n\nTo use the ZorbPy library, you must wrap the functionality of your program in a function that is passed to the `zorb.run()` function call.\n\nAny usage of the functions provided by this library outside of the process started by `zorb.run()` will produce error behavior.\n\n\nThe ZorbPy library provides three main functionalities:\n\n- connecting to advertising Zorb devices\n\n- triggering presets on the Zorb device\n\n- directly controlling actuator intensity on the Zorb device\n\n\nTo connect to an advertising Zorb device:\n```python\nzorb.connect()\n```\n\n\nTo trigger one of the available presets:\n```python\nzorb.triggerPattern(zorb.POINT_LEFT)\n```\n\n*Note that preset haptic emojis are exist for the following emojis:*\n\n\ud83c\udf8a, \ud83d\udc48, \ud83d\udc49, \ud83e\udd1b, \ud83e\udd1c, \u23ee\ufe0f, \u23ed\ufe0f, \ud83d\ude4c, \ud83d\udc4b, \ud83d\ude2f, \ud83d\ude33, \ud83d\ude2c, \ud83d\ude0a, \ud83d\ude04, \ud83e\udd23\n\n\nTo directly set the actuator values:\n```python\nduration = 100\ntop_left = 0\ntop_right = 0\nbottom_left = 25\nbottom_right = 25\n\nzorb.writeActuators(duration, top_left, top_right, bottom_left, bottom_right)\n```\n\n\nBelow is a more comprehensive example of a simple program that connects to a Zorb device, plays a confetti pattern upon successful connection, and then updates actuator values based on some hypothetical sensor output.\n```python\nimport zorb\n\ndef mainloop():\n # perform initial connection to Zorb device\n zorb.connect()\n\n # trigger confetti effect upon successful connection\n zorb.triggerPattern(zorb.CONFETTI)\n\n # enter infinte loop for updating Zorb device\n while True:\n top_left = hypothetical_sensor_1.val()\n top_right = hypothetical_sensor_2.val()\n bottom_left = hypothetical_sensor_3.val()\n bottom_right = hypothetical_sensor_4.val()\n zorb.writeActuators(10, top_left, top_right, bottom_left, bottom_right)\n time.sleep(0.01)\n\n\ndef main():\n zorb.run(mainloop)\n\n\nif __name__ == '__main__':\n main()\n```\n\n## Style Guide\n\nContributions to this project should conform to this [Python Style Guide](https://www.python.org/dev/peps/pep-0008/).\n\n## License\n\nZorbPy is released under the [MIT license](https://github.com/SomaticLabs/ZorbPy/blob/master/LICENSE).", "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/SomaticLabs/ZorbPy", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "zorb", "package_url": "https://pypi.org/project/zorb/", "platform": "", "project_url": "https://pypi.org/project/zorb/", "project_urls": { "Homepage": "https://github.com/SomaticLabs/ZorbPy" }, "release_url": "https://pypi.org/project/zorb/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "Python SDK for the Zorb Engine", "version": "0.1.5" }, "last_serial": 3889566, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "04344850300147424ff69c65c9553d1d", "sha256": "c2b29473a30af8580fa275013a099b3b6d25d49da7f9b8cdd9ca1773dfdd2212" }, "downloads": -1, "filename": "zorb-0.1.4.tar.gz", "has_sig": false, "md5_digest": "04344850300147424ff69c65c9553d1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5434, "upload_time": "2018-05-22T23:17:22", "url": "https://files.pythonhosted.org/packages/d2/fd/80381eb8c27b9a37b1c5aa41c0f61e5737277a65ae5b51c96131523f980c/zorb-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "35df14f92c42d177baee065ebe24fc6e", "sha256": "8d84990ffe5d7a693dfafca7be835305fa7def52fb2a41372a3be91dcd0c0d1b" }, "downloads": -1, "filename": "zorb-0.1.5.tar.gz", "has_sig": false, "md5_digest": "35df14f92c42d177baee065ebe24fc6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5418, "upload_time": "2018-05-22T23:21:37", "url": "https://files.pythonhosted.org/packages/3e/ad/8408ab815932ec9ee3c7607da3a63701ae0a75f41ec3f5f9e86122a63cd5/zorb-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "35df14f92c42d177baee065ebe24fc6e", "sha256": "8d84990ffe5d7a693dfafca7be835305fa7def52fb2a41372a3be91dcd0c0d1b" }, "downloads": -1, "filename": "zorb-0.1.5.tar.gz", "has_sig": false, "md5_digest": "35df14f92c42d177baee065ebe24fc6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5418, "upload_time": "2018-05-22T23:21:37", "url": "https://files.pythonhosted.org/packages/3e/ad/8408ab815932ec9ee3c7607da3a63701ae0a75f41ec3f5f9e86122a63cd5/zorb-0.1.5.tar.gz" } ] }