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

Not able to work with motors #69

Open
mikulatomas opened this issue Apr 23, 2016 · 3 comments
Open

Not able to work with motors #69

mikulatomas opened this issue Apr 23, 2016 · 3 comments

Comments

@mikulatomas
Copy link

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*/

@ValorNaram
Copy link

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.

@liam-b
Copy link

liam-b commented Sep 2, 2016

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

@dlech
Copy link

dlech commented Sep 3, 2016

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants