{ "info": { "author": "Paul Baumgarten", "author_email": "pbaumgarten@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# EasyAsPi\n\nThis project aims to remove a lot of the complexity of dealing with the GPIO and PiCamera for beginner level programmers working with the Raspberry Pi.\n\nThis project has been initially developed for use within my own classes that I teach but I hope it might find use for others too.\n\n## PROJECT HOME\n\n* [EasyAsPi homepage](https://pbaumgarten.com/easyaspi)\n\n## GETTING STARTED\n\nThis assumes you have a Raspberry Pi (and a PiCamera to use that functionality). All code tested on Raspberry Pi model 3, PiCamera model 2, running Raspbian 2018-06-29.\n\n## INSTALL\n\n```\npip install easyaspi\n```\n\n## USAGE\n\nAt present, the project supports LEDs, buttons, ultrasonics and the PiCamera. This list of tools is expected to grow as need arises.\n\n**Note: This library will set the default GPIO pin layout mode to BCM.**\n\n### LEDs\n\n* Create the LED object\n\n```python\nimport easyaspi\nled = easyaspi.LED( pin_number )\n```\n\n* Turn an LED on\n\n```python\nled.set(True)\n```\n\n* Turn an LED off\n\n```python\nled.set(False)\n```\n\n### BUTTONs\n\n* Create the Button object\n\n```python\nimport easyaspi\nbutton = easyaspi.Button( pin_number )\n```\n\n* Retrieve if the button is being pressed\n\n```python\nbutton_state = button.get()\n```\n\n* Set an event callback for button presses\n\n```python\n# Note: The function definition for the callback requires the state parameter even though it should always be set to True to indicate the button is currently pressed.\n\ndef was_pressed(state):\n print(\"Button was pressed!\")\n\nbutton.on_press(was_pressed)\n```\n\n* Remove an event callback\n\n```python\nbutton.remove_on_press() # Remove any event listener for this button\n```\n\n### ULTRASONIC\n\n* Create the Ultrasonic variable\n\n```python\nimport easyaspi\nultra = easyaspi.Ultrasonic( trigger_pin_number, echo_pin_number )\n```\n\n* Retrieve the distance in centimeters\n\n```python\ndistance = ultra.get_distance()\n```\n\n### PICAMERA\n\n* Create the Camera object\n\n```python\nimport easyaspi\ncamera = easyaspi.Camera()\n```\n\n* Take a photo (without a message)\n\n```python\ncamera.photo(\"myphoto.png\")\n```\n\n* Take a photo (with a message)\n\n```python\ncamera.photo(\"myphoto.png\", \"my message\")\n```\n\n* Start video recording\n\n```python\ncamera.record(\"myvideo.h264\", \"my message\")\n```\n\n* Check to see if camera is recording video\n\n```python\nrecording_state = camera.recording # Returns True or False\n```\n\n* Stop video recording\n\n```python\ncamera.stop()\n```\n\n* Close the camera preview window when finished\n\n```python\ncamera.preview(False)\n```\n\n## AUTHOR\n\n* [Paul Baumgarten](https://pbaumgarten.com/)\n\n## LICENSE\n\nMIT License (C) 2018 Paul Baumgarten\n\n\n\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/pypa/easyaspi", "keywords": "raspberrypi GPIO picamera beginner", "license": "", "maintainer": "", "maintainer_email": "", "name": "easyaspi", "package_url": "https://pypi.org/project/easyaspi/", "platform": "", "project_url": "https://pypi.org/project/easyaspi/", "project_urls": { "Homepage": "https://github.com/pypa/easyaspi" }, "release_url": "https://pypi.org/project/easyaspi/2018.3/", "requires_dist": [ "rpi.gpio", "picamera" ], "requires_python": ">=3", "summary": "A module intended to abstract away a lot of the complexity of using the GPIO and PiCamera for beginner programmers.", "version": "2018.3" }, "last_serial": 4472263, "releases": { "2018.1": [ { "comment_text": "", "digests": { "md5": "f03a8d3218f69e180a644b1b129a6cfe", "sha256": "6801b46b7746e83bbc2c0484ef6533ba3f368ddebcf833dbd4385b130a104e7d" }, "downloads": -1, "filename": "easyaspi-2018.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f03a8d3218f69e180a644b1b129a6cfe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 4374, "upload_time": "2018-10-31T10:49:39", "url": "https://files.pythonhosted.org/packages/12/74/e8e47e9050c3aa891507c80e5f66b9d27f61a013fea6c08ea37227682b40/easyaspi-2018.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7dd4e57f139f1d3eeaf560335107fa78", "sha256": "6877a691843fbd3b5f85b1a2b8e41089447014c93cab89b1b8c1521dfad65b6d" }, "downloads": -1, "filename": "easyaspi-2018.1.tar.gz", "has_sig": false, "md5_digest": "7dd4e57f139f1d3eeaf560335107fa78", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3613, "upload_time": "2018-10-31T10:49:41", "url": "https://files.pythonhosted.org/packages/81/25/a7fa2a7fba62d1b478c6a68952db4a95494d6818076fe793ff2edb5a6cd7/easyaspi-2018.1.tar.gz" } ], "2018.2": [ { "comment_text": "", "digests": { "md5": "4f0606392187b0a7f55c9ce7741d992e", "sha256": "ac56f473498f5a26bad21361ea8b43e62d1b88d0ed080dcb99bf94fb9ed5d461" }, "downloads": -1, "filename": "easyaspi-2018.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4f0606392187b0a7f55c9ce7741d992e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 4380, "upload_time": "2018-11-10T13:02:36", "url": "https://files.pythonhosted.org/packages/30/a0/b307bb5bbcc950efaa580073cb6e6804766196682da1d5b11c0acf969781/easyaspi-2018.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e0be30fc7897768b187c85b062b35262", "sha256": "122f0616eb939973ff4b1568fdedac2ed917f28fff9f6bad1c6f9d1491105531" }, "downloads": -1, "filename": "easyaspi-2018.2.tar.gz", "has_sig": false, "md5_digest": "e0be30fc7897768b187c85b062b35262", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3624, "upload_time": "2018-11-10T13:02:37", "url": "https://files.pythonhosted.org/packages/c0/cb/83f71c863a576ede08c891ffb2467e91b93cebb87a0443be2ce13bb36da6/easyaspi-2018.2.tar.gz" } ], "2018.3": [ { "comment_text": "", "digests": { "md5": "9f670a772f28cc103e1f876fdc5605a4", "sha256": "1f3c3febf636318554f313d14c3a443176e00c390e2e0214405456d50d8b0f6c" }, "downloads": -1, "filename": "easyaspi-2018.3-py3-none-any.whl", "has_sig": false, "md5_digest": "9f670a772f28cc103e1f876fdc5605a4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 4387, "upload_time": "2018-11-10T13:26:35", "url": "https://files.pythonhosted.org/packages/65/58/9eca43a173358826c6eb1a51883b7c220b5bb1443f011432103edff229fc/easyaspi-2018.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d66d050177a6122030db905bfb777ecb", "sha256": "ccc2b90355e861e242d4df79e188583255b5a3a4b0bae1644a53be5042e70838" }, "downloads": -1, "filename": "easyaspi-2018.3.tar.gz", "has_sig": false, "md5_digest": "d66d050177a6122030db905bfb777ecb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3623, "upload_time": "2018-11-10T13:26:36", "url": "https://files.pythonhosted.org/packages/24/7f/298c6f547304310b93608c7daa2660ee6f92252cd6c465c8b71a76b8f3b0/easyaspi-2018.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f670a772f28cc103e1f876fdc5605a4", "sha256": "1f3c3febf636318554f313d14c3a443176e00c390e2e0214405456d50d8b0f6c" }, "downloads": -1, "filename": "easyaspi-2018.3-py3-none-any.whl", "has_sig": false, "md5_digest": "9f670a772f28cc103e1f876fdc5605a4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 4387, "upload_time": "2018-11-10T13:26:35", "url": "https://files.pythonhosted.org/packages/65/58/9eca43a173358826c6eb1a51883b7c220b5bb1443f011432103edff229fc/easyaspi-2018.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d66d050177a6122030db905bfb777ecb", "sha256": "ccc2b90355e861e242d4df79e188583255b5a3a4b0bae1644a53be5042e70838" }, "downloads": -1, "filename": "easyaspi-2018.3.tar.gz", "has_sig": false, "md5_digest": "d66d050177a6122030db905bfb777ecb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 3623, "upload_time": "2018-11-10T13:26:36", "url": "https://files.pythonhosted.org/packages/24/7f/298c6f547304310b93608c7daa2660ee6f92252cd6c465c8b71a76b8f3b0/easyaspi-2018.3.tar.gz" } ] }