Skip to content
This repository was archived by the owner on Nov 23, 2019. It is now read-only.
This repository was archived by the owner on Nov 23, 2019. It is now read-only.

Not able to work with motors #69

Open

Description

@mikulatomas

Hi, testing on latest ev3dev and python 3, getting this error

`>>> from ev3.lego import *

d = MediumMotor()
Traceback (most recent call last):
File "", line 1, in
File "/home/robot/.virtualenvs/ev3_py34/lib/python3.4/site-packages/python_ev3-0.0.3.0-py3.4.egg/ev3/lego.py", line 217, in init
File "/home/robot/.virtualenvs/ev3_py34/lib/python3.4/site-packages/python_ev3-0.0.3.0-py3.4.egg/ev3/ev3dev.py", line 330, in init
TypeError: 'NoneType' object is not subscriptable`

I am able to see motors in the folder /sys/class/tacho-motor/motor*/

Activity

  1. ValorNaram commented on May 19, 2016

    @ValorNaram

    run cd /sys/class/tacho-motor and dir and paste the output.
    If you don't see motor0 and so on, then check the wires on the motor.
    And try these steps:

    1. shutdown your robot
    2. disconnect all wires from your brick
    3. boot ev3dev
    4. if boot has finish, then connect the motors using the wires on your brick and run cd /sys/class/tacho-motor and dir again and paste the output too, if an output appears.
  2. liam-b commented on Sep 2, 2016

    @liam-b

    Are you sure you've downloaded and imported lang-python correctly?
    Also this should work:

    import ev3dev.ev3 as ev3
    myMotor = ev3.LargeMotor('outA') # ports are from 'outA' to 'outD'
    # do things with myMotor
  3. dlech commented on Sep 3, 2016

    @dlech

    @liam-b, I think you have "python-ev3" (this repository) confused with "ev3dev-lang-python" (https://github.com/rhempel/ev3dev-lang-python)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions