Skip to content

ev3dev-lang-python and rpyc #236

Closed
Closed

Description

@DJuego

Hi! I am using ev3dev-jessie-ev3-generic-2016-10-17 with Windows 10 x64.
RPyC version 3.3
USB connection

I am trying the new python binding (rhempel) with rpyc. No success. :-(
My code is:

import rpyc
conn = rpyc.classic.connect("192.168.137.3")
ev3devremote = conn.modules.ev3dev
import ev3devremote.ev3 as ev3
ts = ev3.TouchSensor()
while True:
    ev3.Leds.set_color(ev3.Leds.LEFT, (ev3.Leds.GREEN, ev3.Leds.RED)[ts.value()])

The connection with the rpyc server seems OK (welcome, accepted, etc)

I get the error:

no module named 'ev3devremote'

However a similar code worked in the old python binding (ddemidov)

import rpyc
c=rpyc.classic.connect("192.168.137.3")
ev3dev=c.modules.ev3dev
m = ev3dev.large_motor('outA')
m.connected
m.run_timed(time_sp=3000, duty_cycle_sp=75)

I make a silly error?
Any incompatibility with the new binding?

Help! :-/

DJuego

Activity

  1. ddemidov commented on Oct 25, 2016

    @ddemidov
    Member

    The remote import line should be

    ev3remote = conn.modules['ev3dev.ev3']

    Here is a small tutorial I've used recently:
    https://gist.github.com/ddemidov/63dab1dd1b91b493a7752c76e055b5c0

  2. WasabiFan commented on Oct 25, 2016

    @WasabiFan
    Member

    Nice tutorial! Could we add that to the library docs (or somewhere else) for future reference?

    P.S. I switched the Read the Docs documentation so that it defaults to "stable" instead of "latest" now that that's what has shipped in an image.

  3. ddemidov commented on Oct 25, 2016

    @ddemidov
    Member

    Could we add that to the library docs (or somewhere else) for future reference?

    I was going to ask you the same thing 😄

    I switched the Read the Docs documentation so that it defaults to "stable" instead of "latest"

    Yes, I saw the gitter message. So I guess in this case the documentation pull request should be made to master branch?

  4. WasabiFan commented on Oct 25, 2016

    @WasabiFan
    Member

    Yes, I saw the gitter message.

    Ah, cool; I wasn't sure if Gitter would notify you or if you would have to check manually.

    So I guess in this case the documentation pull request should be made to master branch?

    I think we should make it general practice to not push anything directly to master without going through develop, simply because I don't think that we should be merging from master (which is our "complete" branch) backwards into the one for development. How 'bout we make the addition in develop and then work on getting another release out (à la #233)?

  5. DJuego commented on Oct 25, 2016

    @DJuego
    Author

    Amazing ddemidov! It works perfecty! I love you 💯

    DJuego

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions