Learn EV3 Python‎ > ‎

Workflows

There are many ways of working with EV3 Python. This video discusses some of them:


This video looks at some possible workflows for programming the Lego EV3 robot with EV3 Python. This video was made on Windows 10 but most of what is mentioned is valid on other platforms too. The video is in three parts: 
  • a preview of a special workflow based on RPyC (Remote Python Call) that allows EV3 programming to be done without using a terminal
  • beginning at 9:08, a text-based discussion (no demos) of 13 possible workflows, giving advantages and disadvantages for each
  • beginning at 18:57, demonstrations of selected workflows
The workflows discussed in the video are these:

1) Use a Secure Shell (SSH) connection and a terminal-based text editor such as VIM to edit scripts (not demonstrated).
2) Use SSH client with a separate text editor.
3) Use SSH client with a Python IDE such as IDLE, Thonny or PyCharm Edu.
4) Use a Google Chrome SSH app such as Secure Shell or Termius.
5) Map the EV3 to a drive on the PC and use RPyC, storing the scripts on the EV3. 
6) Map the EV3 to a drive on the PC and use RPyC, storing the scripts on the PC (not demonstrated in this video, but perhaps useful in a classroom context?)
7) Use an SSH app such as ConnectBot to connect to the EV3 from devices such as smartphones or tablets (not shown in this video).
8) Use tethering (USB tethering is not explained on ev3dev.org and not demonstrated in this video but perhaps it could be useful in a classroom context?)
9) I understand that using IPython / Jupyter is NOT a good EV3 workflow option because the EV3 has insufficient memory.
10) Using Adafruit WebIDE could be a good option if Adafruit adds instructions for installing and using the WebIDE with the EV3 one day.
11) Use Visual Studio Code, either making scripts on the PC and then synching (copying) them to the EV3, or mapping the EV3 to a drive on the PC so as to be able to edit the scripts directly on the EV3.
12) On Windows 10, use Bash for Ubuntu for Windows to open an SSH connection to a terminal, then edit the Python script in a terminal-based text editor such as nano or VIM.
13) In the powerful free Eclipse IDE, open a remote connection to the EV3, edit the scripts in a proper IDE and use the built-in terminal to run the script.

Some of the workflows discussed above, the ones in blue, use terminal-based text editors such as Nano or Vim - these are quite unintuitive and difficult for beginners to use so should probably be avoided by beginners.

Links:
These discussions are relevant to this video:

Info on downloading, installing and using RPyC to connect with EV3: http://ev3dev-lang.readthedocs.io/projects/python-ev3dev/en/stable/rpyc.html

Download MobaXTerm Home Edition here: http://mobaxterm.mobatek.net/download.html 

Download Thonny Python IDE here: http://thonny.org

ConnectBot, available free from the Google Play Store, allows you to work with your EV3 from your phone or tablet over an SSH connection as long as your EV3 is connected to the same WiFi network. I have successfully edited and run EV3 Python programs from my Samsung phone and my Android tablet. Other SSH apps are available for Android, IPhone etc. Probably not a good way of editing scripts though unless you are on the move and can't use a PC.

If you look at the description of Adafruit WebIDE at https://learn.adafruit.com/webide/overview you will realise that this could be a wonderful way of working with EV3 Python, especially in the classroom. Currently, though, instructions are available only for using Adafruit WebIDE with Raspberry Pi and Beaglebone Black and in any case it may be that the EV3 does not have sufficient memory or processing power to work well with Adafruit WebIDE.
Comments