Answers.Body: <p>Yes, it is definetley possible on Ev3, even with the older mindstorms NXT.</p>
  
  <p>This link should get you started: <a href="https://www.ev3dev.org/docs/tutorials/connecting-to-ev3dev-with-ssh/" rel="nofollow noreferrer">https://www.ev3dev.org/docs/tutorials/connecting-to-ev3dev-with-ssh/</a></p>
  
  <p>Also instead of puTTY there is MobaXTerm:
  <a href="https://www.youtube.com/watch?v=ZfhqZGFJd9A" rel="nofollow noreferrer">https://www.youtube.com/watch?v=ZfhqZGFJd9A</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-20T20:34:30.497Z
Answers.LastActivityDate: 2019-04-20T20:53:04.053Z
Answers.LastEditDate: 2019-04-20T20:53:04.053Z
Answers.UserDisplayName: TechnicTechnician
Body: <p><a href="https://www.ev3dev.org/projects/2014/05/09/Python-Rubiks-Cube-Solver/" rel="nofollow noreferrer">https://www.ev3dev.org/projects/2014/05/09/Python-Rubiks-Cube-Solver/</a></p>
  
  <pre><code>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
  </code></pre>
  
  <p>How do I run a code from my computer?</p>
  
  <pre><code>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()
  </code></pre>
  
  <p>I've tried this code but to import cv2 takes around 2-5 minutes or shows "result expired"</p>
  
Tags: <ev3><mindstorms>
Title: Run Code From PC
UserDisplayName: Dimitrius
ThreadText: # Run Code From PC
  
  (Asked by: username_0 on 2019-04-14)
  
  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"
  
  **Tags:** ev3, mindstorms
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-20. Score: 1
  
  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>
  
  
  ---
  
  