{ "info": { "author": "Fergus Symon", "author_email": "45412+fergofrog@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Information Technology", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: BSD", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Communications", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Micro Wave USB Fan\nThis library is a pure Python reimplementation of the Jaycar RGB USB LED fan\n([GH1031](https://www.jaycar.com.au/programmable-usb-fan/p/GH1031)) protocol.\nCommunication occurs using USB HID reports as a transport. This library uses\n[hidapi](https://pypi.org/project/hidapi/) to do this across Linux, macOS,\nFreeBSD and Windows.\n\n## Installation\n```sh\npip install microwave-usbfan\n```\n\n## Example Implementation\n### Two Text Messages\n```python\nfrom usbfan import Device, Program, TextMessage\n\n# A program is made up of a list of Messages\n# A \"TextMessage\" is a subclass of the generic Message class \np = Program((TextMessage(\"Hello, World!\"),\n TextMessage(\"How is everyone going?\"),))\n \n# Open the device and program\nd = Device()\nd.program(p)\n```\n\n### Single Red Dot\n```python\nfrom usbfan import Colour, Column, Device, Message, Program\n\n# A generic \"Message\" is made up of 1 to 144 \"Column\" object\n# A \"Column\" has 11 boolean pixels and a \"Colour\"\ncolumns = [Column([True] + [False] * 10, Colour.red)]\nfor _ in range(7):\n columns.append(Column([False] * 11, Colour.red))\np = Program((Message(columns),))\n\n# Open the device and program\nd = Device()\nd.program(p)\n```\n\n### Rainbow Message\n```python\nfrom usbfan import Colour, Column, Device, Message, Program, TextMessage\n\n# We can cycle the rainbow here and fill all 144 columns\nrainbow_colours = [Colour.red, Colour.yellow, Colour.green,\n Colour.cyan, Colour.blue, Colour.magenta]\nrainbow = [Column([True] * 11,\n rainbow_colours[i % len(rainbow_colours)])\n for i in range(Message.MAX_COLUMNS)]\np = Program((\n TextMessage(\"Here comes the rainbow!\"),\n Message(rainbow),\n))\n\n# Open the device and program\nd = Device()\nd.program(p)\n```\n\n### Mode Controls\nFor each message, you can define how it opens, what it does once displayed, and\nwhat it does when closing.\n\n```python\nfrom usbfan import Colour, Column, Device, Message, Program, TextMessage, \\\n MessageStyle, OpenTransition, CloseTransition\n\n# We can cycle the rainbow here and fill all 144 columns\nrainbow_colours = [Colour.red, Colour.yellow, Colour.green,\n Colour.cyan, Colour.blue, Colour.magenta]\nrainbow = [Column([True] * 11,\n rainbow_colours[i % len(rainbow_colours)])\n for i in range(Message.MAX_COLUMNS)]\np = Program((\n TextMessage(\"Here comes the rainbow!\",\n message_style=MessageStyle.Flash,\n open_transition=OpenTransition.DownUp,\n close_transition=CloseTransition.DownUp),\n Message(rainbow,\n message_style=MessageStyle.Clockwise,\n open_transition=OpenTransition.FromMiddle,\n close_transition=CloseTransition.ToMiddle),\n))\n\n# Open the device and program\nd = Device()\nd.program(p)\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/fergofrog/microwave_usb_fan", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "microwave-usbfan", "package_url": "https://pypi.org/project/microwave-usbfan/", "platform": "", "project_url": "https://pypi.org/project/microwave-usbfan/", "project_urls": { "Homepage": "https://github.com/fergofrog/microwave_usb_fan" }, "release_url": "https://pypi.org/project/microwave-usbfan/1.1/", "requires_dist": null, "requires_python": "", "summary": "Implementation of the Jaycar RGB USB LED fan (GH1031) protocol", "version": "1.1" }, "last_serial": 5405290, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "1afb8a4648fe4a2e357a38ea5eeeb86e", "sha256": "e431359d856f962fa00b23f225613994ee11b476c9798de3552730e1a8945476" }, "downloads": -1, "filename": "microwave-usbfan-1.0.tar.gz", "has_sig": false, "md5_digest": "1afb8a4648fe4a2e357a38ea5eeeb86e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 155025, "upload_time": "2018-10-19T05:44:56", "url": "https://files.pythonhosted.org/packages/44/ed/de2eac60d18c365ed5501ceadc7be1dc09b086a404213accf93dc61b5d47/microwave-usbfan-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "0408731f5943e2c78d98928edb7d41c8", "sha256": "04ade1f5d25c20028f8211e0f9245e20b89690eb5836fe7f45ada5d36d356e98" }, "downloads": -1, "filename": "microwave-usbfan-1.0.1.tar.gz", "has_sig": false, "md5_digest": "0408731f5943e2c78d98928edb7d41c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 155149, "upload_time": "2019-06-14T10:11:32", "url": "https://files.pythonhosted.org/packages/02/cc/4521e236ec6a75925ac2eb75d4da6c2b2afb6fc9797707f129632d2566fe/microwave-usbfan-1.0.1.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "f76772fff158a4cbeb117666494029be", "sha256": "e24e3d8af10b533d5b7ffc791748f6c253236c27e971d8132678de9d1d669236" }, "downloads": -1, "filename": "microwave-usbfan-1.1.tar.gz", "has_sig": false, "md5_digest": "f76772fff158a4cbeb117666494029be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 155877, "upload_time": "2019-06-16T00:37:45", "url": "https://files.pythonhosted.org/packages/2a/62/d79f8844f086a5970ebe58cbb877481608989ad4e3cb5c393bf5063198d9/microwave-usbfan-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f76772fff158a4cbeb117666494029be", "sha256": "e24e3d8af10b533d5b7ffc791748f6c253236c27e971d8132678de9d1d669236" }, "downloads": -1, "filename": "microwave-usbfan-1.1.tar.gz", "has_sig": false, "md5_digest": "f76772fff158a4cbeb117666494029be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 155877, "upload_time": "2019-06-16T00:37:45", "url": "https://files.pythonhosted.org/packages/2a/62/d79f8844f086a5970ebe58cbb877481608989ad4e3cb5c393bf5063198d9/microwave-usbfan-1.1.tar.gz" } ] }