{ "info": { "author": "Johannes Spielmann", "author_email": "j@spielmannsolutions.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)" ], "description": "# GPIOSimulator\n\nThis Raspberry Pi emulator simulates some of the functions used in the RPi.GPIO library (using python). The intention of this library is educational.\n\n\n## Installation\n\nThe easiest way is to download the zip file and extract the files in the same working environment of your script. To use the emulator just type the following at the beginning of your script.\n\n from EmulatorGUI import GPIO\n\n\n## Simulation\n\nThis library simulates the following functions which are used in the RPi.GPIO library.\n\n GPIO.setmode()\n GPIO.setwarnings()\n GPIO.setup()\n GPIO.input()\n GPIO.output()\n\n\n## Test Example\n\n from EmulatorGUI import GPIO\n #import RPi.GPIO as GPIO\n import time\n import traceback\n\n def Main():\n try:\n GPIO.setmode(GPIO.BCM)\n\n GPIO.setwarnings(False)\n\n GPIO.setup(4, GPIO.OUT)\n GPIO.setup(17, GPIO.OUT, initial = GPIO.LOW)\n GPIO.setup(18, GPIO.OUT, initial = GPIO.LOW)\n GPIO.setup(21, GPIO.OUT, initial = GPIO.LOW)\n GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_UP)\n GPIO.setup(15, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)\n GPIO.setup(24, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)\n GPIO.setup(26, GPIO.IN)\n\n while(True):\n if (GPIO.input(23) == False):\n GPIO.output(4,GPIO.HIGH)\n GPIO.output(17,GPIO.HIGH)\n time.sleep(1)\n\n if (GPIO.input(15) == True):\n GPIO.output(18,GPIO.HIGH)\n GPIO.output(21,GPIO.HIGH)\n time.sleep(1)\n\n if (GPIO.input(24) == True):\n GPIO.output(18,GPIO.LOW)\n GPIO.output(21,GPIO.LOW)\n time.sleep(1)\n\n if (GPIO.input(26) == True):\n GPIO.output(4,GPIO.LOW)\n GPIO.output(17,GPIO.LOW)\n time.sleep(1)\n\n except Exception as ex:\n traceback.print_exc()\n finally:\n GPIO.cleanup() #this ensures a clean exit\n\n Main()\n\n\n## License and copyright\n\nThis library is based on work which is:\n(c) 2016 Roderick Vella, released under Creative Commons Attribution 4.0 International Public License\nIt can be found in this repository at revision 69062b\n\nAll additions made after this revision are\n(c) 2016 Johannes Spielmann, released under AGPL-3.0+", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/shezi/GPIOSimulator", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "GPIOSimulator", "package_url": "https://pypi.org/project/GPIOSimulator/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/GPIOSimulator/", "project_urls": { "Homepage": "https://gitlab.com/shezi/GPIOSimulator" }, "release_url": "https://pypi.org/project/GPIOSimulator/0.1/", "requires_dist": null, "requires_python": null, "summary": "Raspberry Pi GPIO simulator", "version": "0.1" }, "last_serial": 2332279, "releases": { "0.1": [ { "comment_text": "built for Linux-4.4.0-36-generic-x86_64-with-glibc2.9", "digests": { "md5": "52a368e7662955771daa6b4732920249", "sha256": "e0043383324b6c984a256d6e56ca668b7f74571fa5602ee08013dd5a4c444314" }, "downloads": -1, "filename": "GPIOSimulator-0.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "52a368e7662955771daa6b4732920249", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 9547, "upload_time": "2016-09-08T20:51:54", "url": "https://files.pythonhosted.org/packages/84/3f/a98b521b6a71c1f34e216ebbac2f2f07a8da797caf02dccfece767a41f44/GPIOSimulator-0.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "9fd932e284ea1fd375d9f2c16428add5", "sha256": "08a221d03c9c5bd137d573b24aa0ebb9871760b12b8a1090392cbded3d06fee8" }, "downloads": -1, "filename": "GPIOSimulator-0.1.tar.gz", "has_sig": false, "md5_digest": "9fd932e284ea1fd375d9f2c16428add5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5409, "upload_time": "2016-09-08T20:44:05", "url": "https://files.pythonhosted.org/packages/7c/f3/65772749f296e3705e549eb86bffcfbcd90172ff0d48e8353e51cc99775c/GPIOSimulator-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-4.4.0-36-generic-x86_64-with-glibc2.9", "digests": { "md5": "52a368e7662955771daa6b4732920249", "sha256": "e0043383324b6c984a256d6e56ca668b7f74571fa5602ee08013dd5a4c444314" }, "downloads": -1, "filename": "GPIOSimulator-0.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "52a368e7662955771daa6b4732920249", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 9547, "upload_time": "2016-09-08T20:51:54", "url": "https://files.pythonhosted.org/packages/84/3f/a98b521b6a71c1f34e216ebbac2f2f07a8da797caf02dccfece767a41f44/GPIOSimulator-0.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "9fd932e284ea1fd375d9f2c16428add5", "sha256": "08a221d03c9c5bd137d573b24aa0ebb9871760b12b8a1090392cbded3d06fee8" }, "downloads": -1, "filename": "GPIOSimulator-0.1.tar.gz", "has_sig": false, "md5_digest": "9fd932e284ea1fd375d9f2c16428add5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5409, "upload_time": "2016-09-08T20:44:05", "url": "https://files.pythonhosted.org/packages/7c/f3/65772749f296e3705e549eb86bffcfbcd90172ff0d48e8353e51cc99775c/GPIOSimulator-0.1.tar.gz" } ] }