{ "info": { "author": "John Chase", "author_email": "ratteal@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.5", "Topic :: System :: Hardware" ], "description": "# led-shim-demo\n\n![GitHub](https://img.shields.io/github/license/RatJuggler/led-shim-demo)\n![Over-Engineered](https://img.shields.io/badge/over--engineered-definitely-red)\n[![PyPi Package](https://img.shields.io/pypi/v/ledshimdemo.svg)](https://pypi.python.org/pypi/ledshimdemo)\n[![Python Versions](https://img.shields.io/pypi/pyversions/ledshimdemo.svg)](https://pypi.python.org/pypi/ledshimdemo)\n\n[![Travis](https://img.shields.io/travis/com/RatJuggler/led-shim-demo/master.svg?label=master%20build)](https://travis-ci.org/RatJuggler/led-shim-demo)\n[![Coverage Status](https://coveralls.io/repos/github/RatJuggler/led-shim-demo/badge.svg?branch=master)](https://coveralls.io/github/RatJuggler/led-shim-demo?branch=master)\n![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/RatJuggler/led-shim-demo)\n\n[![Travis](https://img.shields.io/travis/com/RatJuggler/led-shim-demo/develop.svg?label=develop%20build)](https://travis-ci.org/RatJuggler/led-shim-demo)\n[![Coverage Status](https://coveralls.io/repos/github/RatJuggler/led-shim-demo/badge.svg?branch=develop)](https://coveralls.io/github/RatJuggler/led-shim-demo?branch=develop)\n\nAn application to display a variety of effects on the Raspberry Pi [led-shim](https://shop.pimoroni.com/products/led-shim)\nfrom Pimoroni.\n\nThe effects are based on the examples given in the base [library](https://github.com/pimoroni/led-shim) plus some \nadditions from my [fork](https://github.com/RatJuggler/led-shim/tree/more-examples).\n\n- Binary Clock - Shows hours, minutes and seconds.\n- Candle - A flickering candle.\n- CheerLights - Synchronize with the [CheerLights](https://cheerlights.com) \"Internet of Things\" project.\n- Coloured Lights - Simple coloured lights like Xmas lights.\n- Digital Rain - Cut price Matrix effect.\n- Gradient Graph - A moving colour gradient determined by the height of a sine wave.\n- Rainbow - A slowly moving rainbow effect.\n- Random Blink - Some random blinking.\n- Solid Colours - A basic effect which just shows a sequence of solid colours.\n\nIf you have more than one Pi with an led-shim you can use the lead/follow commands to share options and perform a simple\nsynchronised start across them. Be sure to start the follow instances before the lead.\n\n# Installing\n\nInstall on Raspbian using:\n```\nsudo pip3 install ledshimdemo\n```\nOr update using:\n```\nsudo pip3 install -U ledshimdemo\n```\n\n# Running\n\n```\n$ ledshimdemo --help\n\nUsage: ledshimdemo [OPTIONS] COMMAND [ARGS]...\n\n Show various effects on one or more Raspberry Pi's with Pimoroni LED\n shim's.\n\n Use the 'display' command for a single Pi. For multiple Pi's one must use\n the 'lead' command and the others the 'follow' command. Ensure you start\n the followers before starting the lead.\n\n To limit the effects shown use the effect-list option to list the effects\n available then add them to the command line as required. Otherwise all\n effects will be shown.\n\nOptions:\n --version Show the version and exit.\n -e, --effect-list List the effects available and exit.\n -l, --log-level [DEBUG|VERBOSE|INFO|WARNING]\n Show additional logging information.\n [default: INFO]\n --help Show this message and exit.\n\nCommands:\n display Display the effects on a single Pi\n follow Follow a lead instance.\n lead Act as a lead for other instances to follow.\n\n$ ledshimdemo display --help\n\nUsage: ledshimdemo display [OPTIONS] [EFFECTS]...\n\n Display the effects on a single Pi\n\nOptions:\n -p, --parade [CYCLE|RANDOM] How the effects are displayed. [default:\n CYCLE]\n -d, --duration INTEGER RANGE How long to display each effect for, in\n seconds (1-180). [default: 10]\n -r, --repeat INTEGER RANGE How many times to run the effects before\n stopping (1-240). [default: 1]\n -b, --brightness INTEGER RANGE How bright the effects will be (1-10).\n [default: 8]\n -i, --invert Change the display orientation.\n --help Show this message and exit.\n\n$ ledshimdmeo follow --help\n\nUsage: ledshimdemo follow [OPTIONS] IP_ADDRESS\n\n Follow a lead instance.\n\nOptions:\n -o, --port INTEGER RANGE Set the port number used for syncing. [default:\n 5556]\n --help Show this message and exit.\n\n$ ledshimdemo lead --help\n\nUsage: ledshimdemo lead [OPTIONS] IP_ADDRESS [EFFECTS]...\n\n Act as a lead for other instances to follow.\n\nOptions:\n -p, --parade [CYCLE|RANDOM] How the effects are displayed. [default:\n CYCLE]\n -d, --duration INTEGER RANGE How long to display each effect for, in\n seconds (1-180). [default: 10]\n -r, --repeat INTEGER RANGE How many times to run the effects before\n stopping (1-240). [default: 1]\n -b, --brightness INTEGER RANGE How bright the effects will be (1-10).\n [default: 8]\n -i, --invert Change the display orientation.\n -o, --port INTEGER RANGE Set the port number used for syncing.\n [default: 5556]\n --help Show this message and exit.\n```\n\nSample output with the default options:\n\n```\n$ ledshimdemo display\n2019-08-31 15:47:36,864 - INFO - Effect Options(parade=CYCLE, duration=10 secs, repeat=1, brightness=8, invert=False, effects=ALL)\n2019-08-31 15:47:36,864 - INFO - Effect: BinaryClock - Shows hours, minutes and seconds. Update Frequency: 1 secs\n2019-08-31 15:47:47,185 - INFO - Effect: Candle - A flickering candle. Update Frequency: 0.01 secs\n2019-08-31 15:47:57,208 - INFO - Effect: CheerLights - Synchronize with the CheerLights \"Internet of Things\" project. Update Frequency: 5 secs\n2019-08-31 15:48:07,745 - INFO - Effect: ColouredLights - Simple coloured lights like Xmas lights. Update Frequency: 0.5 secs\n2019-08-31 15:48:17,817 - INFO - Effect: DigitalRain - Cut price Matrix effect. Update Frequency: 0.02 secs\n2019-08-31 15:48:27,820 - INFO - Effect: GradientGraph - Sine wave colour gradient effect. Update Frequency: 0.01 secs\n2019-08-31 15:48:37,826 - INFO - Effect: Rainbow - A slowly moving rainbow. Update Frequency: 0.01 secs\n2019-08-31 15:48:47,861 - INFO - Effect: RandomBlink - Some random blinking. Update Frequency: 0.05 secs\n2019-08-31 15:48:57,875 - INFO - Effect: SolidColours - A sequence of solid colours. Update Frequency: 0.5 secs\n```\n\n# Troubleshooting\n\nIf anything is going to cause a problem trying to run `ledshimdemo` it will be NumPy which is used by a couple of the \ndemos. The NumPy package is included in most builds of Raspbian, but installed with `apt-get`, this then causes problems\nif anything tries to install a different version with `pip3`. For this reason `ledshimdemo` is set to use the Raspbian\ndefault version (see setup.py) to try and avoid installing a different version with `pip3`. However, if you do get a \nruntime error indicating a corrupted NumPy you could first try uninstalling any local `pip3` versions of it to see if\nthat helps.\n```\npip3 uninstall numpy\n```\n\n# Addendum\n\nThis project is definitely over-engineered for what it actually does because it's being used as a learning exercise.\n\nThe application has a number of output logging levels built into it, including a custom VERBOSE level, to show some of\nthe inner workings. This is just because.\n\nThe effects are loaded dynamically using a mechanism loosely based on code from\n[this](https://github.com/BNMetrics/factory_pattern_sample) Python3 factory pattern example.\n\nThe code coverage for this project is a good example of why measuring unit test coverage can be a misleading indicator\nof quality. Whilst it does have plenty of unit tests those for the effects are mostly simple smoke tests which show that\nthe code will run. They don't actually confirm that the effects are producing the desired output.\n\nThe development work for this project was done using PyCharm on an Intel x64 machine, as the\nproject was designed to be run on an ARM based Raspberry Pi only a source distribution is uploaded to PyPi. However,\nwhen installing under Raspbian it should install the ARM wheel from [PiWheels](https://www.piwheels.hostedpi.com/)\nmaking the installation much faster. See the [PiWheels FAQ](https://www.piwheels.hostedpi.com/faq.html) for more\ninformation.\n\nThe synchronisation using the lead/follow commands is very basic, yes the effect options set for the lead are\ndistributed to the follow instances but there is only a primitive trigger to try and start the displays together and\nthere is no heartbeat to try to keep them in sync. If you run with more than about 10 repeat iterations you'll soon see\nthe displays go out of sync. \n\nBadges showing the build status and code coverage for both the master and develop branches are shown at the top. This is\n a simple solution to the problem of trying to make this file specific to the branch it is in.", "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/RatJuggler/led-shim-demo", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ledshimdemo", "package_url": "https://pypi.org/project/ledshimdemo/", "platform": "", "project_url": "https://pypi.org/project/ledshimdemo/", "project_urls": { "Homepage": "https://github.com/RatJuggler/led-shim-demo" }, "release_url": "https://pypi.org/project/ledshimdemo/2.0.1/", "requires_dist": null, "requires_python": ">=3.5.3", "summary": "Show various effects on a Pimoroni LED shim.", "version": "2.0.1" }, "last_serial": 5764593, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b45935dfd6720c7730fe5451aba39b7d", "sha256": "6e32777376e10cc97ab8396e1e97ebb55e9d60da911980afe75efdd2c77aa60c" }, "downloads": -1, "filename": "ledshimdemo-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b45935dfd6720c7730fe5451aba39b7d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 8040, "upload_time": "2019-07-26T16:19:02", "url": "https://files.pythonhosted.org/packages/3e/97/b220b2cb5938da5cc511dd528de59d55ddeb92dbf0127c996a554a9ebb40/ledshimdemo-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c7ea7b661e20a0af0b582cbd2a293316", "sha256": "578a930b6905295be61372502881f9c87912a7534eb11046c8b1265d1af07c3d" }, "downloads": -1, "filename": "ledshimdemo-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c7ea7b661e20a0af0b582cbd2a293316", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 8914, "upload_time": "2019-07-28T11:41:08", "url": "https://files.pythonhosted.org/packages/f1/a3/95896d90ba2f4bed01686b5b41908b4874a0539731ec9da145ae5b4ea33f/ledshimdemo-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "07a57025b1d0b60f845f1d9b7e77bed2", "sha256": "0f2ee1130214bb3eed78b46db7fbc77862ac76ef9f37f8cbceb9304861893214" }, "downloads": -1, "filename": "ledshimdemo-0.0.3.tar.gz", "has_sig": false, "md5_digest": "07a57025b1d0b60f845f1d9b7e77bed2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 11059, "upload_time": "2019-08-12T13:25:37", "url": "https://files.pythonhosted.org/packages/2d/80/b798fe76c4bf77d06e26dcb4e18d45a71d726993640dda3efef4e8e6b577/ledshimdemo-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "6d36a9f3d3a15f4b28b1dabc3d55f613", "sha256": "2162aa0b9c2787eb4b12562320113568f6c8fee838d8d4b5928a22b58dde8e2e" }, "downloads": -1, "filename": "ledshimdemo-0.0.4.tar.gz", "has_sig": false, "md5_digest": "6d36a9f3d3a15f4b28b1dabc3d55f613", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 11861, "upload_time": "2019-08-13T21:29:07", "url": "https://files.pythonhosted.org/packages/66/d0/e8d3a0e69f127b759d5f89e057f6c208df0f2a2782a692bfb275520c2935/ledshimdemo-0.0.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "aaee646e0337e27d198cf280ef305901", "sha256": "7c46f3743cd7a411ee0fd042ed6c5f0744895c28e7164c2d6653c0339ece20bd" }, "downloads": -1, "filename": "ledshimdemo-1.0.0.tar.gz", "has_sig": false, "md5_digest": "aaee646e0337e27d198cf280ef305901", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 16850, "upload_time": "2019-08-21T18:26:52", "url": "https://files.pythonhosted.org/packages/1c/10/954cbfa9ea97481d6125a70629c204df3e58ec9f9e5d9c55b9daf36d405c/ledshimdemo-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "db30cb4d284ebff7f939b8b584b85028", "sha256": "a5f7b51675b5ded5427b0edefc2a9ed51dd3053a7aca574057aecf5a4f2971fe" }, "downloads": -1, "filename": "ledshimdemo-1.0.1.tar.gz", "has_sig": false, "md5_digest": "db30cb4d284ebff7f939b8b584b85028", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 14517, "upload_time": "2019-08-21T19:54:15", "url": "https://files.pythonhosted.org/packages/d5/0f/e21d76d38ffd2fa29a93ef1ab0bdb66d1093e0709e19ba2552a0cd28db0e/ledshimdemo-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "b501413d15a22d69e3af9920c21e2b07", "sha256": "abe268ff72dff4290e05ae2176b9b551782c1befa9367b9ae8cd2f32193d25ba" }, "downloads": -1, "filename": "ledshimdemo-1.1.0.tar.gz", "has_sig": false, "md5_digest": "b501413d15a22d69e3af9920c21e2b07", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 15621, "upload_time": "2019-08-23T16:28:33", "url": "https://files.pythonhosted.org/packages/d4/b1/62a70e9a48a2ae88cca230cef0ef7aa745c8caad5b63f701cce616cae170/ledshimdemo-1.1.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "74a09d911edb3f3b1208a0418aa1a3d8", "sha256": "63f0ab09637734159be8d227301d8244dcbae335807280218d21868614578320" }, "downloads": -1, "filename": "ledshimdemo-2.0.0.tar.gz", "has_sig": false, "md5_digest": "74a09d911edb3f3b1208a0418aa1a3d8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 18288, "upload_time": "2019-08-31T15:27:50", "url": "https://files.pythonhosted.org/packages/ba/de/1d5cf7b4fd2f0872c68be3a978c3b8d9cd90df4e440dbec46e6ebb355946/ledshimdemo-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "75fe769bdfd1f14b0d0e32a86196fb85", "sha256": "9dc1b8eee3c561106e46b7851c56ada3fedd2c9ff77f39166eb825e7d9dbf974" }, "downloads": -1, "filename": "ledshimdemo-2.0.1.tar.gz", "has_sig": false, "md5_digest": "75fe769bdfd1f14b0d0e32a86196fb85", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 18291, "upload_time": "2019-08-31T15:47:43", "url": "https://files.pythonhosted.org/packages/7b/3b/76c4df30cc313c54595bc116e3a565ec0bd41ee99bb99ec08e922a594f9a/ledshimdemo-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "75fe769bdfd1f14b0d0e32a86196fb85", "sha256": "9dc1b8eee3c561106e46b7851c56ada3fedd2c9ff77f39166eb825e7d9dbf974" }, "downloads": -1, "filename": "ledshimdemo-2.0.1.tar.gz", "has_sig": false, "md5_digest": "75fe769bdfd1f14b0d0e32a86196fb85", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 18291, "upload_time": "2019-08-31T15:47:43", "url": "https://files.pythonhosted.org/packages/7b/3b/76c4df30cc313c54595bc116e3a565ec0bd41ee99bb99ec08e922a594f9a/ledshimdemo-2.0.1.tar.gz" } ] }