Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python demos #49

Closed
Svetomech opened this issue Apr 12, 2015 · 7 comments
Closed

Python demos #49

Svetomech opened this issue Apr 12, 2015 · 7 comments

Comments

@Svetomech
Copy link

They simply doesn't work. "Can't import PIL package" or something. I tried installing PIL through pip, but it says it is incompatible with ev3dev.
Tried installing Pillow, failed (memory error at 99%).
So, what do I do? Or does this mean current state of Python binding is not stable enough to use?
Also, currently it is not clear if I should use Python binding contained in this repo or in https://github.com/topikachu/python-ev3 (it was updated quite a while ago, but I've seen at least one project successfully using it). I, for the record, tried the one that doesn't use virtualenv. Must I do the other way around?

@ddemidov
Copy link
Member

I installed PIL with apt-get install python-pil, and it works for me. Can you try that? Do the rest of the demos work for you as is?

@Svetomech
Copy link
Author

Well, not really. I followed your instructions in https://github.com/ddemidov/ev3dev-lang-python:

apt-get install libboost-python-dev python-setuptools python-pil
easy_install python-ev3dev

Then transferred 'demo' folder to the device using scp and tried launching .py files. None of them work.

@ddemidov
Copy link
Member

The demos assume that certain devices are connected, and may fail otherwise. Can you try to connect the touch sensor to your ev3 and try the following?

>>> from ev3dev import *
>>> ts = touch_sensor()
>>> ts.connected
True
>>> ts.port_name
'in1'
>>> ts.value()
0

@Svetomech
Copy link
Author

Works as intended, duh.

@ddemidov
Copy link
Member

If you connect two large motors to ports B and C, an infrared and a touch sensor (to any ports), then remote-control.py should work for you. If it still does not, can you post the error message here?

@ddemidov
Copy link
Member

May this be closed?

@Svetomech
Copy link
Author

Sorry, forgot about the issue.
Eeyup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants