{ "info": { "author": "Luiz Eduardo Nishino Gomes do Amaral", "author_email": "luizamaral306@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Hardware" ], "description": "RPistepper\n==========\n\nRPistepper is a library containing: \\* A class to control a stepper\nmotor with a RPi. \\* A function to execute a zig-zag motion with two\nmotors. \\* A function to execute a square\\_spiral motion with two\nmotors.\n\nWiring\n------\n\nIn our setup, the power to the motors (Vm) is supplied with the 5V pins\nof the RPi, the grounding of the coils is controlled with a\n`ULN2803A `__ transistor\narray.\n\n.. figure:: pinout.png\n :alt: Example setup\n\n Alt text\n\nConections RPi - ULN2803A:\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n+-----------------+------------+\n| RPi Pin (BCM) | ULN2803A |\n+=================+============+\n| 17 | 1B |\n+-----------------+------------+\n| 27 | 2B |\n+-----------------+------------+\n| 10 | 3B |\n+-----------------+------------+\n| 9 | 4B |\n+-----------------+------------+\n| 14 | 5B |\n+-----------------+------------+\n| 15 | 6B |\n+-----------------+------------+\n| 23 | 7B |\n+-----------------+------------+\n| 24 | 8B |\n+-----------------+------------+\n\nConections ULN2803A - Motors:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n+------------+---------------------+\n| ULN2803A | Motors |\n+============+=====================+\n| 1C | Motor\\_1 Coil\\_A1 |\n+------------+---------------------+\n| 2C | Motor\\_1 Coil\\_A2 |\n+------------+---------------------+\n| 3C | Motor\\_1 Coil\\_B1 |\n+------------+---------------------+\n| 4C | Motor\\_1 Coil\\_B2 |\n+------------+---------------------+\n| 5C | Motor\\_2 Coil\\_A1 |\n+------------+---------------------+\n| 6C | Motor\\_2 Coil\\_A2 |\n+------------+---------------------+\n| 7C | Motor\\_2 Coil\\_B1 |\n+------------+---------------------+\n| 8C | Motor\\_2 Coil\\_B2 |\n+------------+---------------------+\n\nIn this case, two motors were attached to the ULN2803A.\n\nUsage\n-----\n\nclass Motor\n^^^^^^^^^^^\n\nThis class allows the user to control a 6 pin stepper motor using 4 GPIO\npins of a RPi.\n\nSoftware uses BCM mode for pin indexing.\n\nThis class is best used with the 'with' statement to properly handle the\ncleanup of the GPIOs.\n\nself.steps is a property of this class that will get the number of steps\ntaken from the initial position or set to a specific step, similar to\nself.move.\n\nIn order to save power, it's advised to call self.release() when the\nmotor is idle.\n\nArguments are a list with the 4 pins (Coil\\_A1, Coil\\_A2, Coil\\_B1,\nCoil\\_B2), the delay between steps (default = 20ms) and verbose to\ndisplay reports on the motor movements, the last two are optional. e.g:\n\n.. code:: python\n\n import RPistepper as stp\n M1_pins = [17, 27, 10, 9]\n with stp.Motor(M1_pins) as M1:\n for i in range(10): # moves 20 steps,release and wait\n print M1\n M1.move(20)\n M1.release()\n raw_input('enter to execute next step')\n\nIf the class is instantiated normally, use the method ``cleanup`` prior\nto closing the application to close the GPIO resources. Also, if it's\nimportant to go back to the initial position when finishing the routine,\nuse the method ``reset``.\n\n.. code:: python\n\n import RPistepper as stp\n M1_pins = [17, 27, 10, 9]\n M1 = stp.Motor(M1_pins)\n for i in range(10): # moves 20 steps,release and wait\n print M1\n M1.move(20)\n M1.release()\n raw_input('enter to execute next step')\n M1.reset()\n M1.cleanup()\n\nMethods\n^^^^^^^\n\nCurrently there are five implemented methods:\n\n.. code:: python\n\n def move(self, steps):\n '''\n Moves the motor 'steps' steps. Negative steps moves the motor backwards\n '''\n\n.. code:: python\n\n def release(self):\n '''\n Sets all pins low. Power saving mode\n '''\n\n.. code:: python\n\n def reset(self):\n '''\n Returns the motor to it's initial position\n '''\n\n.. code:: python\n\n def zero(self):\n '''\n Sets the motor to the next position which Coil_A1 and Coil_A2\n are on. Sets this position as the reference (steps = 0).\n '''\n\n.. code:: python\n\n def cleanup(self):\n '''\n Cleans the GPIO resources\n '''\n\nThe main method is ``move``, which moves the motor the desired number of\nsteps\n\nsteps property\n^^^^^^^^^^^^^^\n\nIt's possible to check the motor position or manually set the desired\nstep using the ``steps`` property:\n\n.. code:: python\n\n import RPistepper as stp\n M1_pins = [17, 27, 10, 9]\n with stp.Motor(M1_pins) as M1:\n for i in range(10): # moves 20 steps,release and wait\n print M1.steps\n M1.steps = 20*i\n M1.release()\n raw_input('enter to execute next step')\n M1.reset()\n\nAttributes\n^^^^^^^^^^\n\nThis class haves the following attributes:\n\n+-----------------+------------------------------------------------+\n| Attribute | Data |\n+=================+================================================+\n| DELAY | Time between steps |\n+-----------------+------------------------------------------------+\n| VERBOSE | Display motor data on screen |\n+-----------------+------------------------------------------------+\n| PINS | GPIOs used by the instance |\n+-----------------+------------------------------------------------+\n| actual\\_state | A list with the status of the coils (on/off) |\n+-----------------+------------------------------------------------+\n\nfunctions\n~~~~~~~~~\n\nThese two functions executes pre determined movements and requires two\nstepper motor objects:\n\n.. code:: python\n\n def zig_zag(motor1, motor2, amp1, amp2, delay=None):\n '''\n Executes a zig-zag movement with two RPistepper objects.\n Arguments are: motor1 and motor2 objects and amp1, amp2, the amplitude\n of movement, a tuple (step, rep) representing the number of steps per\n iteration and the number of iterations of the following algorithm:\n Repeat rep1 times:\n 1. Moves motor 2 step2*rep2 steps forward\n 2. Moves motor 1 step1 steps forward\n 3. Moves motor 2 step2*rep2 steps backwards\n 4. Moves motor 1 step1 steps forward\n Reset to initial state\n Release the motors\n It's possible to change the delay between steps with the 'delay' argument\n '''\n\n.. code:: python\n\n def square_spiral(motor1, motor2, amplitude, delay=None):\n '''\n Executes a square spiral movement with two RPistepper objects.\n Arguments are: motor1 and motor2 objects and the amplitude of movement,\n a tuple (step, rep) representing the number of steps per iteration and\n the number of iterations of the following algorithm:\n for i in range(rep):\n 1. Moves motor 2 to position i\n 2. Moves motor 1 to position i\n 3. Moves motor 1 to position -i\n 4. Moves motor 2 to position -i\n Reset to initial state\n Release the motors\n It's possible to change the delay between steps with the 'delay' argument\n '''\n\n/bin/rpistepper\n---------------\n\n``rpistepper`` is a shell for controlling the motors. It provides all\nthe methods in the ``Motor`` class. All the commands are documented in\nthe shell. It's possible to pipe a list of commands to the shell:\n\n.. code:: bash\n\n rpistepper < sample.stp\n or\n cat sample.stp | rpistepper\n\nInvoking ``rpistepper`` with ``-g`` flag will open a GUI application\nwith similar functionality\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/luxedo/RPistepper", "keywords": "RPi ULN2803A stepper motor", "license": "GPL3", "maintainer": "", "maintainer_email": "", "name": "RPistepper", "package_url": "https://pypi.org/project/RPistepper/", "platform": "", "project_url": "https://pypi.org/project/RPistepper/", "project_urls": { "Homepage": "https://github.com/luxedo/RPistepper" }, "release_url": "https://pypi.org/project/RPistepper/0.3a1/", "requires_dist": [ "RPi.GPIO (>=0.5.8)" ], "requires_python": "", "summary": "RPistepper is a library control stepper motors using a Raspberry Pi and a transistor array", "version": "0.3a1" }, "last_serial": 4733718, "releases": { "0.1a0": [], "0.2a0": [ { "comment_text": "", "digests": { "md5": "b89639414e495108f4ae87e5ca8f5404", "sha256": "0cdfbbce2f6adacc656d217b7be58377f0283a10cac63197a924170582594193" }, "downloads": -1, "filename": "RPistepper-0.2a0.tar.gz", "has_sig": false, "md5_digest": "b89639414e495108f4ae87e5ca8f5404", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5344, "upload_time": "2015-12-13T23:27:36", "url": "https://files.pythonhosted.org/packages/5c/ab/3f6a49c0d1394aecb261e39d06ce1a8928c89467ea641c768a9289a23681/RPistepper-0.2a0.tar.gz" } ], "0.3a0": [ { "comment_text": "", "digests": { "md5": "70ef1094e80ec0bb783e51a59736143f", "sha256": "7fd497053bd2867e6f99128a1c27d3cbfa64d2662814a47441707fe1cdf873d4" }, "downloads": -1, "filename": "RPistepper-0.3a0.tar.gz", "has_sig": false, "md5_digest": "70ef1094e80ec0bb783e51a59736143f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11221, "upload_time": "2016-01-14T16:06:39", "url": "https://files.pythonhosted.org/packages/75/14/960946cfa5769da2bbfb12c947c5e72fd8f00ea2912cec20f3db427be1f9/RPistepper-0.3a0.tar.gz" } ], "0.3a1": [ { "comment_text": "", "digests": { "md5": "80c877c2d99ec3fd8c286b1758174604", "sha256": "22088cf45642cc4f6528acaec5a3a89001d7dd767d5928ba36f0d25566c84937" }, "downloads": -1, "filename": "RPistepper-0.3a1-py3-none-any.whl", "has_sig": false, "md5_digest": "80c877c2d99ec3fd8c286b1758174604", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25239, "upload_time": "2018-12-19T13:22:30", "url": "https://files.pythonhosted.org/packages/0f/3d/66c98d74a66b0b157403ebc231e1bf1c603483f917a5210e05c6971e0d26/RPistepper-0.3a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed028ec984fd99c8744b4c1e1e9cb915", "sha256": "d5acb4f1b2f48156508766d1ee95b37deaaf99af8a1bda9a0e050f83439dde2c" }, "downloads": -1, "filename": "RPistepper-0.3a1.tar.gz", "has_sig": false, "md5_digest": "ed028ec984fd99c8744b4c1e1e9cb915", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12836, "upload_time": "2018-12-19T13:22:32", "url": "https://files.pythonhosted.org/packages/71/37/7d6c53cdc01c1079af1c7def49d113f0aa30414a472ef31d08b48f1ed4a6/RPistepper-0.3a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "80c877c2d99ec3fd8c286b1758174604", "sha256": "22088cf45642cc4f6528acaec5a3a89001d7dd767d5928ba36f0d25566c84937" }, "downloads": -1, "filename": "RPistepper-0.3a1-py3-none-any.whl", "has_sig": false, "md5_digest": "80c877c2d99ec3fd8c286b1758174604", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25239, "upload_time": "2018-12-19T13:22:30", "url": "https://files.pythonhosted.org/packages/0f/3d/66c98d74a66b0b157403ebc231e1bf1c603483f917a5210e05c6971e0d26/RPistepper-0.3a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed028ec984fd99c8744b4c1e1e9cb915", "sha256": "d5acb4f1b2f48156508766d1ee95b37deaaf99af8a1bda9a0e050f83439dde2c" }, "downloads": -1, "filename": "RPistepper-0.3a1.tar.gz", "has_sig": false, "md5_digest": "ed028ec984fd99c8744b4c1e1e9cb915", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12836, "upload_time": "2018-12-19T13:22:32", "url": "https://files.pythonhosted.org/packages/71/37/7d6c53cdc01c1079af1c7def49d113f0aa30414a472ef31d08b48f1ed4a6/RPistepper-0.3a1.tar.gz" } ] }