0

https://www.ev3dev.org/projects/2014/05/09/Python-Rubiks-Cube-Solver/

The other one gives a solution in around 20 steps, but takes around 500 MB of memory, so I need to run it on a computer

How do I run a code from my computer?

import socket
hostname = socket.gethostname()

if hostname == 'ev3dev':
    # We are on the EV3, import required modules directly
    import ev3dev.ev3   as ev3
    import ev3dev.fonts as fonts
    import PIL
    import os, subprocess
    ev3.Sound.beep().wait()
else:
    # We are somewhere else. Assume we are using RPyC:
    import rpyc
    conn  = rpyc.classic.connect('192.168.15.3')
    ev3   = conn.modules['ev3dev.ev3']
    fonts = conn.modules['ev3dev.fonts']
    PIL   = conn.modules['PIL']
    os    = conn.modules['os']
    getpass    = conn.modules['getpass']
    locale    = conn.modules['locale']
    #sys   = conn.modules['sys']
    namepc = getpass.getuser()
    name = (namepc.title())
    print(name)
    cv2    = conn.modules['cv2']
    subprocess   = conn.modules['subprocess']
    ev3.Sound.beep()

I've tried this code but to import cv2 takes around 2-5 minutes or shows "result expired"

0

Yes, it is definetley possible on Ev3, even with the older mindstorms NXT.

This link should get you started: https://www.ev3dev.org/docs/tutorials/connecting-to-ev3dev-with-ssh/

Also instead of puTTY there is MobaXTerm: https://www.youtube.com/watch?v=ZfhqZGFJd9A

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.